NDIS_WAIT_FOR_MUTEX (Compact 7)
3/12/2014
This macro puts the current thread into the wait state until the specified mutex object is set to the signaled state.
Syntax
NDIS_WAIT_FOR_MUTEX(_Mutex_)
Parameters
- _Mutex_
A pointer to an initialized NDIS_MUTEX-type mutex object. The caller initialized the mutex object in a prior call to the NDIS_INIT_MUTEX macro. NDIS_MUTEX is a wrapper for the KMUTEX type.
Return Value
NDIS_WAIT_FOR_MUTEX returns the following status value:
Value | Description |
---|---|
STATUS_SUCCESS |
The operation completed successfully. |
Remarks
NDIS network drivers should use the NDIS_WAIT_FOR_MUTEX macro to wait for a mutex to transition to the signaled state.
A driver cannot wait for a nonzero time interval on a mutex object at a raised IRQL or in an arbitrary thread context (that is, the context of whatever thread is current when a driver function is called).
NDIS_WAIT_FOR_MUTEX examines the current state of the mutex object to determine whether the wait operation can be satisfied immediately. If the operation can be satisfied immediately, the necessary updates are made to mutex object. Otherwise, the current thread is in a waiting state, and a new thread is selected for execution on the current processor.
This macro is an NDIS wrapper for the KeWaitForSingleObject routine.
Callers of NDIS_WAIT_FOR_MUTEX must be running at IRQL = PASSIVE_LEVEL and in a nonarbitrary thread context.
Requirements
Header |
ndis.h |
See Also
Reference
NDIS Interrupt and Synchronization Macros
NDIS_INIT_MUTEX
NDIS_RELEASE_MUTEX