My Project
UDK 3.2.7 C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | List of all members
osl::Mutex Class Reference

A mutual exclusion synchronization object. More...

#include <mutex.hxx>

Inheritance diagram for osl::Mutex:
salhelper::FutureQueue< element_type >

Public Member Functions

 Mutex ()
 Create a thread-local mutex.
 ~Mutex ()
 Release the OS-structures and free mutex data-structure.
sal_Bool acquire ()
 Acquire the mutex, block if already acquired by another thread.
sal_Bool tryToAcquire ()
 Try to acquire the mutex without blocking.
sal_Bool release ()
 Release the mutex.

Static Public Member Functions

static MutexgetGlobalMutex ()
 Returns a global static mutex object.

Detailed Description

A mutual exclusion synchronization object.

Constructor & Destructor Documentation

osl::Mutex::Mutex ( )
inline

Create a thread-local mutex.

Returns
0 if the mutex could not be created, otherwise a handle to the mutex. osl_createMutex()
osl::Mutex::~Mutex ( )
inline

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

osl_destroyMutex()

Member Function Documentation

sal_Bool osl::Mutex::acquire ( )
inline

Acquire the mutex, block if already acquired by another thread.

Returns
sal_False if system-call fails. osl_acquireMutex()
static Mutex* osl::Mutex::getGlobalMutex ( )
inlinestatic

Returns a global static mutex object.

The global and static mutex object can be used to initialize other static objects in a thread safe manner.

Returns
the global mutex object osl_getGlobalMutex()
sal_Bool osl::Mutex::release ( )
inline

Release the mutex.

Returns
sal_False if system-call fails. osl_releaseMutex()
sal_Bool osl::Mutex::tryToAcquire ( )
inline

Try to acquire the mutex without blocking.

Returns
sal_False if it could not be acquired. osl_tryToAcquireMutex()

The documentation for this class was generated from the following file: