diff options
author | Sadie Powell <sadie@witchery.services> | 2024-02-11 19:53:05 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-02-11 19:53:05 +0000 |
commit | 2c5b84bd1d7a846b10d302ef5da185a75ab2489c (patch) | |
tree | 813fdf58ae084d55c5206020e90036124e2b6219 /include/threadengine.h | |
parent | 5c50bcb9c76afc6e2d8552ebc57674f385c674fc (diff) |
Replace Condition and Mutex with the C++11 standard equivalents.
Diffstat (limited to 'include/threadengine.h')
-rw-r--r-- | include/threadengine.h | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/include/threadengine.h b/include/threadengine.h index 79e545166..7849ab89d 100644 --- a/include/threadengine.h +++ b/include/threadengine.h @@ -59,58 +59,3 @@ public: */ virtual void Run() = 0; }; - -class CoreExport Mutex -{ -protected: - /* A mutex, used to keep threads in sync */ - pthread_mutex_t mutex; - -public: - /** Constructor - */ - Mutex(); - - /** Destructor - */ - ~Mutex(); - - /** Attempt to lock the mutex, will hang until a lock can be achieved - */ - void Lock(); - - /** Unlock the mutex, it must be locked first - */ - void Unlock(); - - /** Attempt to lock the mutex, will return true on success and false on fail - * Does not block - * @return true or false - */ - bool TryLock(); -}; - -class CoreExport Condition - : public Mutex -{ -private: - /* A condition */ - pthread_cond_t cond; - -public: - /** Constructor - */ - Condition(); - - /** Destructor - */ - ~Condition(); - - /** Called to wakeup the waiter - */ - void Wakeup(); - - /** Called to wait for a Wakeup() call - */ - void Wait(); -}; |