Mutex Class Reference

#include <sync.h>

Inheritance diagram for Mutex:

Public Member Functions

 Mutex (bool recursive=false)
virtual ~Mutex ()
void lock ()
void unlock ()
zmm::Ref< MutexAutolockgetAutolock (bool unlocked=false)
void retain ()
void release ()
int getRefCount ()

Static Public Member Functions

static void * operator new (size_t size)
static void operator delete (void *ptr)

Protected Member Functions

pthread_mutex_t * getMutex ()

Protected Attributes

pthread_mutex_t mutex_struct
mt_atomic_t _ref_count
pthread_mutex_t mutex


class MutexAutolock
class Cond

Detailed Description

Definition at line 73 of file sync.h.

Constructor & Destructor Documentation

Mutex::Mutex ( bool  recursive = false  ) 

Definition at line 42 of file

References mutex_struct, and NULL.

Mutex::~Mutex (  )  [virtual]

Definition at line 69 of file

References mutex_struct.

Member Function Documentation

zmm::Ref<MutexAutolock> Mutex::getAutolock ( bool  unlocked = false  )  [inline]

Definition at line 85 of file sync.h.

References MutexAutolock.

pthread_mutex_t* Mutex::getMutex (  )  [inline, protected]

Definition at line 88 of file sync.h.

References mutex_struct.

int Object::getRefCount (  )  [inherited]

Definition at line 78 of file

References zmm::Object::_ref_count, and atomic_get().

void Mutex::lock (  )  [inline]

Definition at line 79 of file sync.h.

References mutex_struct.

void Object::operator delete ( void *  ptr  )  [static, inherited]

Definition at line 87 of file

References FREE.

void * Object::operator new ( size_t  size  )  [static, inherited]

Definition at line 83 of file

References MALLOC.

void Object::release (  )  [inherited]
void Object::retain (  )  [inherited]
void Mutex::unlock (  )  [inline]

Definition at line 80 of file sync.h.

References mutex_struct.

Friends And Related Function Documentation

friend class Cond [friend]

Definition at line 107 of file sync.h.

friend class MutexAutolock [friend]

Definition at line 106 of file sync.h.

Referenced by getAutolock().

Field Documentation

mt_atomic_t zmm::Object::_ref_count [protected, inherited]
pthread_mutex_t zmm::Object::mutex [protected, inherited]
pthread_mutex_t Mutex::mutex_struct [protected]

Definition at line 87 of file sync.h.

Referenced by getMutex(), lock(), Mutex(), unlock(), and ~Mutex().

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

Generated on Fri Mar 26 20:16:57 2010 for MediaTomb by  doxygen 1.6.1