2005/5/9

     
 

class core_mutex

artefaktur
Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

acdk::lang::sys::core_mutex Class Reference

#include <core_mutex.h>

List of all members.


Detailed Description

This is the internal implementation of a recursiv mutex.

Note that is is designed to work with core_condition to enable Java style object synchronisation. Use fast_mutex/static_mutex if want to protect static not recursiv code.


Public Member Functions

pthread_t owner ()
pthread_mutex_t & mutex ()
int lockCount ()
 core_mutex ()
 defined(ACDK_HAS_PTHREAD_RECURSIVE_MUTEX)

 ~core_mutex ()
void lock ()
void unlock ()
bool try_lock ()
int get_lock_count () const

Private Member Functions

void _lock (int count)

Private Attributes

int _lockCount
core_fastmutex _mutex
pthread_t _threadOwner
core_fastmutex _internalMutex

Friends

class core_condition


Constructor & Destructor Documentation

acdk::lang::sys::core_mutex::core_mutex  ) 
 

defined(ACDK_HAS_PTHREAD_RECURSIVE_MUTEX)

acdk::lang::sys::core_mutex::~core_mutex  ) 
 


Member Function Documentation

void acdk::lang::sys::core_mutex::_lock int  count  )  [private]
 

int acdk::lang::sys::core_mutex::get_lock_count  )  const [inline]
 

void acdk::lang::sys::core_mutex::lock  ) 
 

int acdk::lang::sys::core_mutex::lockCount  )  [inline]
 

pthread_mutex_t& acdk::lang::sys::core_mutex::mutex  )  [inline]
 

pthread_t acdk::lang::sys::core_mutex::owner  )  [inline]
 

bool acdk::lang::sys::core_mutex::try_lock  ) 
 

void acdk::lang::sys::core_mutex::unlock  ) 
 


Friends And Related Function Documentation

friend class core_condition [friend]
 


Member Data Documentation

core_fastmutex acdk::lang::sys::core_mutex::_internalMutex [private]
 

int acdk::lang::sys::core_mutex::_lockCount [private]
 

core_fastmutex acdk::lang::sys::core_mutex::_mutex [private]
 

pthread_t acdk::lang::sys::core_mutex::_threadOwner [private]