[pso] [tema2]win - deinregistrare intrerupere -
IoDisconnectInterrupt
omar Chouydary
chouydary at yahoo.com
Thu Apr 19 23:33:20 EEST 2007
Sa zicem ca atunci cand incarcam driver-ul avem o eroare pe parcurs si trebuie sa deinregistram o intrerupere (adica sa apelam IoDisconnectInterrupt ) . Conform celor din Windows 2000 Device Driver trebuie asa:
"Disconnecting from an interrupt is a two-step procedure. First, use KeSyncrhonizeExecution and a SynchCritSection routine to disable the device and prevent it from generating any further interrupts. Second, remove the ISR from the kernel's list of handlers by passing the device's interrupt object to IoDisconnectInterrupt. "
Deci ar trebui sa apelez IoDisconnectInterrupt in acea SynchCritSection routine (dupa cele spuse mai sus). Problema este ca daca ne uitam in DDK la acest IoDisconnectInterrupt vedem asta:
"Callers of IoDisconnectInterrupt must be running at IRQL = PASSIVE_LEVEL"
Din moment ce la aplul KeSynchronizeExecution se schimba nivelul (a se vedea:
" When this routine is called, the following occurs:
The IRQL is raised to the SynchronizeIrql specified in the call to IoConnectInterrupt.
Access to SynchronizeContext is synchronized with the corresponding ISR by acquiring the associated interrupt object spin lock.
The specified SynchCritSection routine is called with the SynchronizeContext value as its parameter.
The SynchCritSection routine runs at DIRQL, so it must execute very quickly." )
se pare ca avem un mare conflict de interese. So in windows 2000 driver model e scris aiurea ce trebuie facut? Adica pur si simplu apelez IoDisconnectInterrupt fara KeSynchronizeExecution?
Sry de mesajul acesta asa lung dar mi s-a parut foarte dubioasa treaba.
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
Check outnew cars at Yahoo! Autos.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cursuri.cs.pub.ro/pipermail/pso/attachments/20070419/9da2a6b8/attachment.html
More information about the pso
mailing list