A Co-Routine Semaphore.
More...
#include <coroutine.hpp>
|
| semaphore (size_t init) |
| Initializes a coroutine semaphore with a value for the counter. Internally, the semaphores use an size_t to represent the counter, therefore the init argument should be within range of this type.
|
|
void | set (size_t val) noexcept |
| Set the coroutine semaphore with a value for the counter. Internally, the semaphores use an size_t to represent the counter, therefore the val argument should be within range of this type.
|
|
◆ semaphore()
qOS::co::semaphore::semaphore |
( |
size_t | init | ) |
|
|
inlineexplicit |
Initializes a coroutine semaphore with a value for the counter. Internally, the semaphores use an size_t
to represent the counter, therefore the init argument should be within range of this type.
- See also
- co::semWait()
-
co::semSignal()
- Parameters
-
[in] | init | The initial count of the semaphore. |
◆ set()
void qOS::co::semaphore::set |
( |
size_t | val | ) |
|
|
noexcept |
Set the coroutine semaphore with a value for the counter. Internally, the semaphores use an size_t
to represent the counter, therefore the val argument should be within range of this type.
- See also
- co::semWait()
-
co::semSignal()
- Parameters
-
[in] | val | The initial count of the semaphore. |