locked
KeSetEvent followed by KeWaitForObjectxxx RRS feed

  • Question

  • From MSDN Page for KeSetEvent

    If Wait = TRUE, the routine returns without lowering the IRQL. In this case, the KeSetEvent call must be immediately followed by a KeWaitXxx call. By setting Wait = TRUE, the caller can prevent an unnecessary context switch from occurring between the KeSetEvent call and the KeWaitXxx call.

    This statements means Setting on event object to Signaled state and start Waiting for another object to avoid context switching?

    Sunday, February 7, 2016 8:36 AM

Answers

  • Yes, this is intended to construct more complex sync schemes, for example, event pair: one event goes down and other event goes up, atomically. 

    -- pa

    Sunday, February 7, 2016 11:33 AM