UDK 3.2.7 C/C++ API Reference
|
C++ wrapper class around C semaphore functions. More...
#include <semaphor.hxx>
Public Member Functions | |
Semaphore (sal_uInt32 initialCount) | |
Creates a semaphore. | |
~Semaphore () | |
Release the OS-structures and free semaphore data-structure. | |
sal_Bool | acquire () |
acquire() decreases the count. | |
sal_Bool | tryToAcquire () |
tryToAcquire() tries to decreases the count. | |
sal_Bool | release () |
release() increases the count. |
C++ wrapper class around C semaphore functions.
osl::Semaphore::Semaphore | ( | sal_uInt32 | initialCount | ) | [inline] |
osl::Semaphore::~Semaphore | ( | ) | [inline] |
Release the OS-structures and free semaphore data-structure.
sal_Bool osl::Semaphore::acquire | ( | ) | [inline] |
acquire() decreases the count.
It will block if it tries to decrease below zero.
sal_Bool osl::Semaphore::release | ( | ) | [inline] |
release() increases the count.
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.