LONG
KeReadStateSemaphore(
IN PKSEMAPHORE Semaphore
);
KeReadStateSemaphore returns the current state, Signaled or Not-Signaled, of a given semaphore object.
If the return value is zero, the current state of the semaphore object is Not-Signaled.
Callers of KeReadStateSemaphore can be running at any IRQL.