CyberEngineMkIII
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
CYBSemaphore.hpp
Go to the documentation of this file.
1 namespace CYB {
3  namespace Platform {
4  namespace System {
7  ENABLE_TEST_HOOKS
8  private:
9  unsigned long long FServiceCount,
10  FWakeCount,
11  FSleepCount;
12  private:
18  void Lock(void) noexcept;
24  void Unlock(void) noexcept;
25 
31  void EnterCV(void) noexcept;
32  public:
39  Semaphore();
41  ~Semaphore();
42 
44  void SignalN(const unsigned long long AN) noexcept final override;
46  void SignalAll(void) noexcept final override;
48  void Wait(void) noexcept final override;
49  };
50  };
51  };
52 };
unsigned long long FWakeCount
The number of threads that will be woken.
Definition: CYBSemaphore.hpp:9
void Unlock(void) noexcept
Unlock the mutex associated with the CV.
unsigned long long FSleepCount
The number of threads currently asleep.
Definition: CYBSemaphore.hpp:9
A reliable wait queue.
Definition: Semaphore.hpp:9
void Lock(void) noexcept
Lock the mutex associated with the CV.
A reliable wait queue.
Definition: CYBSemaphore.hpp:6
void SignalN(const unsigned long long AN) noexceptfinaloverride
Signal N waiters of this semaphore. Will not signal more than are currently waiting.
unsigned long long FServiceCount
The number the next waiting thread will take.
Definition: CYBSemaphore.hpp:9
void Wait(void) noexceptfinaloverride
Wait indefinitely for a signal from this semaphore. Will be placed last into the queue.
void SignalAll(void) noexceptfinaloverride
Signal all current waiters of this semaphore.
Definition: CYBSemaphore.cpp:4
void EnterCV(void) noexcept
Enter the condition variable.