UDK 3.2.7 C/C++ API Reference
Public Member Functions
osl::Semaphore Class Reference

C++ wrapper class around C semaphore functions. More...

#include <semaphor.hxx>

List of all members.

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.

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:
initialCountdenotes 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

sal_Bool osl::Semaphore::acquire ( ) [inline]

acquire() decreases the count.

It will block if it tries to decrease below zero.

Returns:
False if the system-call failed.
sal_Bool osl::Semaphore::release ( ) [inline]

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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines