summaryrefslogtreecommitdiff
path: root/src/threadengine.cpp
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-02-11 19:53:05 +0000
committerSadie Powell <sadie@witchery.services>2024-02-11 19:53:05 +0000
commit2c5b84bd1d7a846b10d302ef5da185a75ab2489c (patch)
tree813fdf58ae084d55c5206020e90036124e2b6219 /src/threadengine.cpp
parent5c50bcb9c76afc6e2d8552ebc57674f385c674fc (diff)
Replace Condition and Mutex with the C++11 standard equivalents.
Diffstat (limited to 'src/threadengine.cpp')
-rw-r--r--src/threadengine.cpp45
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);
-}