C++ wrapper class around C semaphore functions.
More...
#include <semaphor.hxx>
Detailed Description
C++ wrapper class around C semaphore functions.
- Deprecated:
- Must not be used, as unnamed semaphores are not supported on Mac OS X.
Constructor & Destructor Documentation
osl::Semaphore::Semaphore |
( |
sal_uInt32 |
initialCount | ) |
|
|
inline |
Creates a semaphore.
- Parameters
-
initialCount | denotes the starting value the semaphore. If you set it to zero, the first acquire() blocks. Otherwise InitialCount acquire()s are immedeatly successfull. |
- Returns
- 0 if the semaphore could not be created, otherwise a handle to the sem.
osl::Semaphore::~Semaphore |
( |
| ) |
|
|
inline |
Release the OS-structures and free semaphore data-structure.
- Returns
- fbbb
Member Function Documentation
acquire() decreases the count.
It will block if it tries to decrease below zero.
- Returns
- False if the system-call failed.
release() increases the count.
- Returns
- False if the system-call failed.
sal_Bool osl::Semaphore::tryToAcquire |
( |
| ) |
|
|
inline |
tryToAcquire() tries to decreases the count.
It will return with False if it would decrease the count below zero. (When acquire() would block.) If it could successfully decrease the count, it will return True.
The documentation for this class was generated from the following file: