The KePulseEvent routine atomically sets an event object to a signaled state, attempts to satisfy as many waits as possible, and then resets the event object to a not-signaled state.
NTKERNELAPI LONG KePulseEvent( PRKEVENT Event, KPRIORITY Increment, BOOLEAN Wait );
A pointer to a dispatcher object of type KEVENT.
Specifies the priority increment that is to be applied if setting the event causes a wait to be satisfied.
Specifies a Boolean value that signifies whether the call to KePulseEvent will be immediately followed by a call to one of the KeWaitXxx routines. If TRUE, the KePulseEvent call is immediately followed by a call to KeWaitForMultipleObjects, KeWaitForMutexObject, or KeWaitForSingleObject. For more information, see the following Remarks section.
The previous signal state of the event object.
For more information about event objects, see Event Objects.
The KePulseEvent routine might temporarily raise the IRQL. If the Wait parameter is FALSE, the routine, before it returns, restores the IRQL to the original value that it had at the start of the call.
If Wait = TRUE, the routine returns without lowering the IRQL. In this case, the KePulseEvent 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 KePulseEvent call and the KeWaitXxx call. The KeWaitXxx routine, before it returns, restores the IRQL to its original value at the start of the KePulseEvent call. Although the IRQL disables context switches between the two calls, these calls cannot reliably be used as the start and end of an atomic operation. For example, between these two calls, a thread that is running at the same time on another processor might change the state of the event object or of the target of the wait.
If the caller is executing at IRQL = DISPATCH_LEVEL or in an arbitrary thread context, the Timeout parameter to KeWaitXxx must be zero.
|Windows version||Available starting with Windows 2000.|
|Header||ntddk.h (include Ntddk.h)|
|DDI compliance rules||IrqlKeDispatchLte, HwStorPortProhibitedDDIs|