#include <Mutex.hpp>
Public Methods | |
Mutex () | |
virtual | ~Mutex () |
Protected Methods | |
virtual void | lock () |
virtual void | unlock () |
virtual void | wait () |
Private Methods | |
Mutex (const Mutex &src) | |
Mutex & | operator= (const Mutex &right) |
void | notify () |
void | notifyAll () |
Private Attributes | |
pthread_mutex_t | mutex |
pthread_mutexattr_t | mutexAttr |
pthread_cond_t | cond |
pthread_condattr_t | condAttr |
Friends | |
class | Lock |
|
Definition at line 6 of file Mutex.cpp. 00006 { 00007 pthread_mutexattr_init(&mutexAttr); 00008 pthread_mutex_init(&mutex, &mutexAttr); 00009 pthread_condattr_init(&condAttr); 00010 pthread_cond_init(&cond, &condAttr); 00011 } |
|
Definition at line 13 of file Mutex.cpp. 00013 { 00014 pthread_mutex_destroy(&mutex); 00015 pthread_mutexattr_destroy(&mutexAttr); 00016 pthread_cond_destroy(&cond); 00017 pthread_condattr_destroy(&condAttr); 00018 } |
|
|
|
Definition at line 20 of file Mutex.cpp. 00020 { 00021 pthread_mutex_lock(&mutex); 00022 } |
|
Definition at line 32 of file Mutex.cpp. 00032 { 00033 pthread_cond_signal(&cond); 00034 } |
|
Definition at line 36 of file Mutex.cpp. 00036 { 00037 pthread_cond_broadcast(&cond); 00038 } |
|
|
|
Definition at line 24 of file Mutex.cpp. 00024 { 00025 pthread_mutex_unlock(&mutex); 00026 } |
|
Definition at line 28 of file Mutex.cpp. 00028 { 00029 pthread_cond_wait(&cond, &mutex); 00030 } |
|
|
|
|
|
|
|
|
|
|