OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Friends | List of all members
OpenThreads::Mutex Class Reference

This class provides an object-oriented thread mutex interface. More...

#include <Mutex.h>

Inheritance diagram for OpenThreads::Mutex:
Inheritance graph
[legend]

Public Types

enum  MutexType { MUTEX_NORMAL, MUTEX_RECURSIVE }
 

Public Member Functions

 Mutex (MutexType type=MUTEX_NORMAL)
 
virtual ~Mutex ()
 
MutexType getMutexType () const
 
virtual int lock ()
 
virtual int unlock ()
 
virtual int trylock ()
 

Friends

class Condition
 

Detailed Description

This class provides an object-oriented thread mutex interface.

Definition at line 31 of file Mutex.h.

Member Enumeration Documentation

Enumerator
MUTEX_NORMAL 
MUTEX_RECURSIVE 

Definition at line 37 of file Mutex.h.

Constructor & Destructor Documentation

OpenThreads::Mutex::Mutex ( MutexType  type = MUTEX_NORMAL)

Constructor

virtual OpenThreads::Mutex::~Mutex ( )
virtual

Destructor

Member Function Documentation

MutexType OpenThreads::Mutex::getMutexType ( ) const
inline

Definition at line 54 of file Mutex.h.

virtual int OpenThreads::Mutex::lock ( )
virtual

Lock the mutex

Returns
0 if normal, -1 if errno set, errno code otherwise.

Here is the caller graph for this function:

virtual int OpenThreads::Mutex::trylock ( )
virtual

Test if mutex can be locked.

Returns
0 if normal, -1 if errno set, errno code otherwise.
virtual int OpenThreads::Mutex::unlock ( )
virtual

Unlock the mutex

Returns
0 if normal, -1 if errno set, errno code otherwise.

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class Condition
friend

Definition at line 33 of file Mutex.h.


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