Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members  

RazorBack::Mutex_ Class Reference

Class Mutex_: wrapper class for POSIX mutexes. More...

#include <MTsync.hh>

List of all members.

Public Methods

 Mutex_ ()
 Init the mutex to default settings.

 ~Mutex_ ()
 dtor.

void lock ()
 lock(): locks the calling mutex object.

bool trylock ()
 trylock(): tries to lock the calling mutex object without blocking. More...

void unlock ()
 unlock(): unlocks the calling mutex object.


Private Methods

 Mutex_ (const Mutex_ &)
Mutex_& operator= (const Mutex_ &)

Private Attributes

pthread_mutex_t Mutex
 a POSIX mutex.


Detailed Description

Class Mutex_: wrapper class for POSIX mutexes.

Initialisation, destroying and the lock/unlock operations are implemented.

Definition at line 43 of file MTsync.hh.


Constructor & Destructor Documentation

RazorBack::Mutex_::Mutex_ ( ) [inline]
 

Init the mutex to default settings.

Definition at line 54 of file MTsync.hh.

RazorBack::Mutex_::~Mutex_ ( ) [inline]
 

dtor.

Definition at line 57 of file MTsync.hh.

RazorBack::Mutex_::Mutex_ ( const Mutex_ & ) [private]
 


Member Function Documentation

void RazorBack::Mutex_::lock ( ) [inline]
 

lock(): locks the calling mutex object.

Definition at line 63 of file MTsync.hh.

bool RazorBack::Mutex_::trylock ( ) [inline]
 

trylock(): tries to lock the calling mutex object without blocking.

Returns true if the locking was successful.

Definition at line 69 of file MTsync.hh.

void RazorBack::Mutex_::unlock ( ) [inline]
 

unlock(): unlocks the calling mutex object.

Definition at line 75 of file MTsync.hh.

Mutex_& RazorBack::Mutex_::operator= ( const Mutex_ & ) [private]
 


Member Data Documentation

pthread_mutex_t RazorBack::Mutex_::Mutex [private]
 

a POSIX mutex.

Definition at line 48 of file MTsync.hh.


The documentation for this class was generated from the following file:
Generated at Wed Aug 21 09:33:35 2002 for The Razorback C++ Library: POSIX Thread Wrappers by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001