Windows2003-3790/drivers/smartcrd/gempc430/wdmsem.cpp
2020-09-30 16:53:55 +02:00

25 lines
633 B
C++

#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);
}