|
rllib
1
|
#include <rlthread.h>
Public Member Functions | |
| rlMutex (const pthread_mutexattr_t *attr=NULL) | |
| virtual | ~rlMutex () |
| int | trylock () |
| int | lock () |
| int | unlock () |
Public Attributes | |
| pthread_mutex_t | mutex |
Mutex functions based on POSIX threads.
Definition at line 118 of file rlthread.h.
| rlMutex::rlMutex | ( | const pthread_mutexattr_t * | attr = NULL | ) |
Definition at line 85 of file rlthread.cpp.
{
rlwthread_mutex_init(&mutex, attr);
}
| rlMutex::~rlMutex | ( | ) | [virtual] |
Definition at line 90 of file rlthread.cpp.
{
rlwthread_mutex_destroy(&mutex);
}
| int rlMutex::lock | ( | ) |
Lock the mutex.
Definition at line 100 of file rlthread.cpp.
{
return rlwthread_mutex_lock(&mutex);
}
| int rlMutex::trylock | ( | ) |
Try to lock the mutex. return 0 if already locked return !0 if lock sucessfull
Definition at line 95 of file rlthread.cpp.
{
return rlwthread_mutex_trylock(&mutex);
}
| int rlMutex::unlock | ( | ) |
Unlock the mutex.
Definition at line 105 of file rlthread.cpp.
{
return rlwthread_mutex_unlock(&mutex);
}
Definition at line 141 of file rlthread.h.
1.7.5.1