diff options
Diffstat (limited to 'src/threadengine.cpp')
-rw-r--r-- | src/threadengine.cpp | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/src/threadengine.cpp b/src/threadengine.cpp index 0ae709db9..5630a99aa 100644 --- a/src/threadengine.cpp +++ b/src/threadengine.cpp @@ -81,48 +81,3 @@ void Thread::OnNotify() this->Join(); this->flags[SF_DEAD] = true; } - -Mutex::Mutex() -{ - pthread_mutex_init(&mutex, NULL); -} - -Mutex::~Mutex() -{ - pthread_mutex_destroy(&mutex); -} - -void Mutex::Lock() -{ - pthread_mutex_lock(&mutex); -} - -void Mutex::Unlock() -{ - pthread_mutex_unlock(&mutex); -} - -bool Mutex::TryLock() -{ - return pthread_mutex_trylock(&mutex) == 0; -} - -Condition::Condition() : Mutex() -{ - pthread_cond_init(&cond, NULL); -} - -Condition::~Condition() -{ - pthread_cond_destroy(&cond); -} - -void Condition::Wakeup() -{ - pthread_cond_signal(&cond); -} - -void Condition::Wait() -{ - pthread_cond_wait(&cond, &mutex); -} |