| 497 | } |
| 498 | |
| 499 | bool Semaphore::start_wait(internals::ipc_signal_t sig) { |
| 500 | _lock.lock(); |
| 501 | if (_value > 0) { |
| 502 | if (internals::send_signal(internals::vmem.current_process, sig)) |
| 503 | _value--; |
| 504 | _lock.unlock(); |
| 505 | return false; |
| 506 | } |
| 507 | _waiting[_tail] = internals::vmem.current_process; |
| 508 | _signals[_tail] = sig; |
| 509 | next(_tail); |
| 510 | _lock.unlock(); |
| 511 | return true; |
| 512 | } |
| 513 | |
| 514 | bool Semaphore::stop_wait() { |
| 515 | bool result = false; |
nothing calls this directly
no test coverage detected