summaryrefslogtreecommitdiff
path: root/core/os/semaphore.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/os/semaphore.h')
-rw-r--r--core/os/semaphore.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/core/os/semaphore.h b/core/os/semaphore.h
index e0b4460b22..8956fb7c39 100644
--- a/core/os/semaphore.h
+++ b/core/os/semaphore.h
@@ -36,18 +36,16 @@
*/
class Semaphore {
protected:
- static Semaphore* (*create_func)();
+ static Semaphore *(*create_func)();
public:
+ virtual Error wait() = 0; ///< wait until semaphore has positive value, then decrement and pass
+ virtual Error post() = 0; ///< unlock the semaphore, incrementing the value
+ virtual int get() const = 0; ///< get semaphore value
- virtual Error wait()=0; ///< wait until semaphore has positive value, then decrement and pass
- virtual Error post()=0; ///< unlock the semaphore, incrementing the value
- virtual int get() const=0; ///< get semaphore value
-
- static Semaphore * create(); ///< Create a mutex
+ static Semaphore *create(); ///< Create a mutex
virtual ~Semaphore();
};
-
#endif