cheshirekow  v0.1.0
pthreads::Mutex Class Reference

a mutual exclusion lock More...

#include <cpp_pthreads/mutex.h>

Public Member Functions

int destroy ()
 calls pthread_mutex_destroy More...
 
int getPriorityCeiling (int &)
 get the priority ceiling More...
 
int init ()
 calls pthread_mutex_init More...
 
int init (const Attr< Mutex > &attr)
 calls pthread_mutex_init with an attribute object More...
 
int lock ()
 lock the mutex, block until succeed More...
 
ScopedLock scopedLock ()
 return a scoped lock More...
 
int setPriorityCeiling (int newCeil, int *oldCeil)
 change the priority ceiling More...
 
int trylock ()
 try to lock the mutex, but dont block More...
 
int unlock ()
 unlock the mutex after a successful lock More...
 

Private Attributes

pthread_mutex_t m_data
 

Friends

class Condition
 

Detailed Description

a mutual exclusion lock

Definition at line 85 of file mutex.h.

Member Function Documentation

int pthreads::Mutex::destroy ( )

calls pthread_mutex_destroy

int pthreads::Mutex::getPriorityCeiling ( int &  )

get the priority ceiling

int pthreads::Mutex::init ( )

calls pthread_mutex_init

int pthreads::Mutex::init ( const Attr< Mutex > &  attr)

calls pthread_mutex_init with an attribute object

int pthreads::Mutex::lock ( )

lock the mutex, block until succeed

ScopedLock pthreads::Mutex::scopedLock ( )

return a scoped lock

int pthreads::Mutex::setPriorityCeiling ( int  newCeil,
int *  oldCeil 
)

change the priority ceiling

int pthreads::Mutex::trylock ( )

try to lock the mutex, but dont block

int pthreads::Mutex::unlock ( )

unlock the mutex after a successful lock

Friends And Related Function Documentation

friend class Condition
friend

Definition at line 90 of file mutex.h.

Member Data Documentation

pthread_mutex_t pthreads::Mutex::m_data
private

Definition at line 87 of file mutex.h.


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