My Project
UDK 3.2.7 C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Typedefs | Functions
semaphor.h File Reference
#include <sal/types.h>

Go to the source code of this file.

Typedefs

typedef void * oslSemaphore

Functions

SAL_DLLPUBLIC oslSemaphore osl_createSemaphore (sal_uInt32 initialCount)
 Creates a semaphore.
SAL_DLLPUBLIC void osl_destroySemaphore (oslSemaphore Semaphore)
 Release the OS-structures and free semaphore data-structure.
SAL_DLLPUBLIC sal_Bool osl_acquireSemaphore (oslSemaphore Semaphore)
 acquire() decreases the count.
SAL_DLLPUBLIC sal_Bool osl_tryToAcquireSemaphore (oslSemaphore Semaphore)
 tryToAcquire() tries to decreases the count.
SAL_DLLPUBLIC sal_Bool osl_releaseSemaphore (oslSemaphore Semaphore)
 release() increases the count.

Typedef Documentation

typedef void* oslSemaphore

Function Documentation

SAL_DLLPUBLIC sal_Bool osl_acquireSemaphore ( oslSemaphore  Semaphore)

acquire() decreases the count.

It will block if it tries to decrease below zero.

Deprecated:
Must not be used, as unnamed semaphores are not supported on Mac OS X.
Returns
False if the system-call failed.
SAL_DLLPUBLIC oslSemaphore osl_createSemaphore ( sal_uInt32  initialCount)

Creates a semaphore.


Deprecated:
Must not be used, as unnamed semaphores are not supported on Mac OS X.
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.
SAL_DLLPUBLIC void osl_destroySemaphore ( oslSemaphore  Semaphore)

Release the OS-structures and free semaphore data-structure.

Deprecated:
Must not be used, as unnamed semaphores are not supported on Mac OS X.
Returns
fbbb
SAL_DLLPUBLIC sal_Bool osl_releaseSemaphore ( oslSemaphore  Semaphore)

release() increases the count.

Deprecated:
Must not be used, as unnamed semaphores are not supported on Mac OS X.
Returns
False if the system-call failed.
SAL_DLLPUBLIC sal_Bool osl_tryToAcquireSemaphore ( oslSemaphore  Semaphore)

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.

Deprecated:
Must not be used, as unnamed semaphores are not supported on Mac OS X.