VOID
KeInitializeSemaphore(
IN PKSEMAPHORE Semaphore,
IN LONG Count,
IN LONG Limit
);
KeInitializeSemaphore initializes a semaphore object with a given count and specifies an upper limit that the count can attain.
The semaphore object is initialized with the specified initial count and limit.
Storage for a semaphore object must be resident: in the device extension of a driver-created device object, in the controller extension of a driver-created controller object, or in nonpaged pool allocated by the caller.
Callers of KeInitializeSemaphore must be running at IRQL PASSIVE_LEVEL.
KeReadStateSemaphore, KeReleaseSemaphore, KeWaitForMultipleObjects, KeWaitForSingleObject