A user semaphore optimized for the case where we do not block.
More...
#include <semaphore.h>
List of all members.
Public Member Functions |
| Semaphore (unsigned cap_sm=0, bool create=false) |
void | down () |
void | up () |
unsigned | sm () |
Detailed Description
A user semaphore optimized for the case where we do not block.
This semaphore implementation breaks when threads blocking on the associated kernel semaphore can be canceled, because the kernel semaphore and the shared counter might then be out-of-sync.
Constructor & Destructor Documentation
Semaphore::Semaphore |
( |
unsigned |
cap_sm = 0 , |
|
|
bool |
create = false | |
|
) |
| | [inline] |
Member Function Documentation
void Semaphore::down |
( |
|
) |
[inline] |
unsigned Semaphore::sm |
( |
|
) |
[inline] |
void Semaphore::up |
( |
|
) |
[inline] |
The documentation for this class was generated from the following file: