Closed echoechoin closed 1 year ago
size_t
is an unsigned integer, so value < 0
will never happen. And we can define SEM_VALUE_MAX
to limit the max of value
.
Could you modify this PR so that I can merge it?
It's awkward that these parts (semaphore, channel, pool) lack testing and may have some bugs...
No problem, I will fix it.
just for learn coroutine and raise some issues by the way.
It has been merged.
The initial value of the semaphore can be either a positive value (i.e., greater than zero) indicating an unlocked semaphore or a value of 0 (zero) indicating a locked semaphore.
refers to https://www.qnx.com/developers/docs/6.4.0/neutrino/lib_ref/s/sem_init.html