MCPcopy Create free account
hub / github.com/Singular/Singular / start_wait

Method start_wait

kernel/oswrapper/vspace.cc:499–512  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

497}
498
499bool 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
514bool Semaphore::stop_wait() {
515 bool result = false;

Callers

nothing calls this directly

Calls 4

send_signalFunction · 0.85
nextFunction · 0.85
lockMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected