I would image that you would use events objects instead.
Write your own lock functions. When one thread aquires
lock the event object is cleared. Other threads
attempting to aquire lock wait for the event object to be
signaled. When first thread finishes with protocted data
it releases the lock and sets the event object to
signaled, then one of the other threads gets woken up
and then aquires the lock.
example ...
KeInitializeEvent(&LockEvent, SynchronizationEvent, TRUE);
int AquireLock(void)
{
// wait for object to be signaled ...
NTSTATUS ntStatus = KeWaitForSingleObject(&LockEvent,...)
//
// object is autoreset so is now cleared and
// lock is aquired - other threads call AquireLock
// and go to sleep at KeWaitForSingleObject() waiting
// for event to get signaled.
}
int ReleaseLock(void)
{
// release lock - set event - other waiting threads
// will get woken up
KeSetEvent(LockEvent,...)
}
Steve.