musst semaphore.counter public machen, hasse alles. init läuft nun
This commit is contained in:
@@ -25,7 +25,6 @@ class Semaphore {
|
||||
// Prevent copies and assignments
|
||||
Semaphore(const Semaphore&) = delete;
|
||||
Semaphore& operator=(const Semaphore&) = delete;
|
||||
unsigned counter;
|
||||
Queue<Thread> waiting;
|
||||
|
||||
public:
|
||||
@@ -33,6 +32,7 @@ class Semaphore {
|
||||
* \param c Initial counter value
|
||||
*/
|
||||
explicit Semaphore(unsigned c = 0) : counter(c) {}
|
||||
unsigned counter;
|
||||
|
||||
/*! \brief Wait for access to the critical area.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user