The EngIsSemaphoreOwnedByCurrentThread function determines whether the currently executing thread holds the specified semaphore.
BOOL
EngIsSemaphoreOwnedByCurrentThread(
IN HSEMAPHORE hsem
);
EngIsSemaphoreOwnedByCurrentThread returns TRUE if the currently executing thread holds the specified semaphore, and FALSE if it does not.
Declared in winddi.h. Include winddi.h.
EngAcquireSemaphore, EngCreateSemaphore, EngReleaseSemaphore, EngIsSemaphoreOwned