24 #include "TPMutex.hpp"
26 TPMutex::TPMutex(
void) {
27 pthread_mutex_init(&this->_mutex, NULL);
30 TPMutex::~TPMutex(
void) {
31 pthread_mutex_destroy(&this->_mutex);
34 void TPMutex::Lock(
void) {
35 pthread_mutex_lock(&this->_mutex);
38 void TPMutex::Release(
void) {
39 pthread_mutex_unlock(&this->_mutex);
42 bool TPMutex::TryLock(
void) {
43 if(pthread_mutex_trylock(&this->_mutex) == 0)