diff options
Diffstat (limited to 'raul/Semaphore.hpp')
-rw-r--r-- | raul/Semaphore.hpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/raul/Semaphore.hpp b/raul/Semaphore.hpp index c7b29ef..e17b788 100644 --- a/raul/Semaphore.hpp +++ b/raul/Semaphore.hpp @@ -52,6 +52,10 @@ public: #endif } + /** Destroy and reset the semaphore to an initial value. + * + * This must not be called while there are any waiters. + */ inline void reset(unsigned int initial) { #ifdef __APPLE__ MPDeleteSemaphore(_sem); @@ -62,15 +66,6 @@ public: #endif } - inline bool has_waiter() { - int val; - #ifdef __APPLE__ - #else - sem_getvalue(&_sem, &val); - #endif - return (val <= 0); - } - /** Increment (and signal any waiters). * * Realtime safe. |