10.1.2 Running a SynchCritSection Routine
Every nonISR routine in an NT device driver must synchronize its access to areas shared with its ISR by calling KeSynchronizeExecution with a pointer to the interrupt object(s) associated with the ISR and with a driver-supplied SynchCritSection routine.
Making this call protects the shared data or device ports/registers with the spin lock that is associated with the driver's interrupt object(s). Holding the spin lock masks device interrupts of lower or equivalent IRQL on the SynchCritSection routine's processor, and prevents the shared area from being simultaneously accessed from the ISR in Windows NTŪ SMP machines.