#include <SyncObjects.h>
Inheritance diagram for OW32::CSemaphore:

Public Member Functions | |
| CSemaphore (LONG lMaximumCount, LONG lInitialCount=0, LPCTSTR lpszName=NULL, LPSECURITY_ATTRIBUTES lpSecAttr=NULL) | |
| Construct a new semaphore object. | |
| CSemaphore (HANDLE hSemaphore) | |
| Construct a new semaphore object. | |
| CSemaphore & | operator= (HANDLE hSemaphore) |
| Set the encapsulated semaphore handle. | |
| virtual BOOL | Lock (DWORD dwTimeout=INFINITE) |
| Wait for the semaphore's count to become non-zero. | |
| void | Unlock () |
| Unused. | |
| BOOL | Release (LONG lReleaseCount, LPLONG lPreviousCount=NULL) |
| Increment the semaphore's count. | |
| operator HANDLE () const | |
| HANDLE extractor for the semaphore object. | |
A semaphore is a counting object, the count ranges between zero and a user specified maximum value. The state of a semaphore is signaled when its count is greater than zero and nonsignaled when it is zero. The count is decreased by one whenever a wait function releases a thread that was waiting for the semaphore. The count is increased by a specified amount by calling the Release function.
|
||||||||||||||||||||
|
Construct a new semaphore object.
|
|
|
Construct a new semaphore object.
|
|
|
Wait for the semaphore's count to become non-zero.
Implements OW32::CSyncObject. |
|
|
Set the encapsulated semaphore handle.
|
|
||||||||||||
|
Increment the semaphore's count.
|
1.3.9.1