#include <ksync.h>
Public Member Functions | |
KSemaphore (int InitialCount=0, int Limit=0x7FFFFFFF) | |
~KSemaphore () | |
bool | Valid () |
NTSTATUS | Wait (KWAIT_REASON WaitReason=Executive, KPROCESSOR_MODE WaitMode=KernelMode, bool Alertable=false) |
void | Signal (int Count=1, KPRIORITY Increment=IO_NO_INCREMENT, bool NextCallIsWaitXXX=false) |
Private Attributes | |
PKSEMAPHORE | m_pSemaphore |
This class represents a semaphore. A semaphore is set to a signalled state when its value is non-zero. Each KSemaphore::Wait() call decreases the value by 1 and each KSemaphore::Signal() call increases it. See the IrpQueue class for usage example.
BazisLib::DDK::KSemaphore::KSemaphore | ( | int | InitialCount = 0 , |
|
int | Limit = 0x7FFFFFFF | |||
) | [inline] |
Initializes the KSemaphore object. See KeInitializeSemaphore() for details.
InitialCount | Specifies the initial count of the semaphore. | |
Limit | Specifies the maximum value of the semaphore. |
BazisLib::DDK::KSemaphore::~KSemaphore | ( | ) | [inline] |
void BazisLib::DDK::KSemaphore::Signal | ( | int | Count = 1 , |
|
KPRIORITY | Increment = IO_NO_INCREMENT , |
|||
bool | NextCallIsWaitXXX = false | |||
) | [inline] |
bool BazisLib::DDK::KSemaphore::Valid | ( | ) | [inline] |
NTSTATUS BazisLib::DDK::KSemaphore::Wait | ( | KWAIT_REASON | WaitReason = Executive , |
|
KPROCESSOR_MODE | WaitMode = KernelMode , |
|||
bool | Alertable = false | |||
) | [inline] |
PKSEMAPHORE BazisLib::DDK::KSemaphore::m_pSemaphore [private] |