9 pthread_mutex_t* handle =
new(std::nothrow) pthread_mutex_t;
13 pthread_mutexattr_t attr;
14 pthread_mutexattr_init(&attr);
22 stat = pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_NORMAL);
26 stat = pthread_mutexattr_setprotocol(&attr,PTHREAD_PRIO_INHERIT);
29 stat = pthread_mutex_init(handle,&attr);
36 NATIVE_INT_TYPE stat = pthread_mutex_destroy(
reinterpret_cast<pthread_mutex_t*
>(this->m_handle));
38 delete reinterpret_cast<pthread_mutex_t*
>(this->m_handle);
42 NATIVE_INT_TYPE stat = pthread_mutex_lock(
reinterpret_cast<pthread_mutex_t*
>(this->m_handle));
47 NATIVE_INT_TYPE stat = pthread_mutex_unlock(
reinterpret_cast<pthread_mutex_t*
>(this->m_handle));
PlatformPointerCastType POINTER_CAST
PlatformIntType NATIVE_INT_TYPE
virtual ~Mutex()
Destructor.
void unLock()
unlock the mutex
void lock()
lock the mutex
Mutex()
Constructor. Mutex is unlocked when created.