mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
609 B
24 lines
609 B
#include "wdmsem.h"
|
|
|
|
#pragma PAGEDCODE
|
|
CSemaphore* CWDMSemaphore::create(VOID)
|
|
{ return new (NonPagedPool) CWDMSemaphore; }
|
|
|
|
#pragma PAGEDCODE
|
|
VOID CWDMSemaphore::initialize(IN PRKSEMAPHORE Semaphore, IN LONG Count, IN LONG Limit)
|
|
{
|
|
::KeInitializeSemaphore (Semaphore,Count,Limit);
|
|
}
|
|
|
|
#pragma PAGEDCODE
|
|
LONG CWDMSemaphore::release(IN PRKSEMAPHORE Semaphore,IN KPRIORITY Increment,IN LONG Adjustment,IN BOOLEAN Wait)
|
|
{
|
|
return ::KeReleaseSemaphore(Semaphore,Increment,Adjustment,Wait);
|
|
|
|
}
|
|
|
|
#pragma PAGEDCODE
|
|
LONG CWDMSemaphore::getState(IN PRKSEMAPHORE Semaphore)
|
|
{
|
|
return KeReadStateSemaphore(Semaphore);
|
|
}
|