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

Method wait

kernel/oswrapper/vspace.cc:485–497  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

483}
484
485void Semaphore::wait() {
486 _lock.lock();
487 if (_value > 0) {
488 _value--;
489 _lock.unlock();
490 return;
491 }
492 _waiting[_tail] = internals::vmem.current_process;
493 _signals[_tail] = 0;
494 next(_tail);
495 _lock.unlock();
496 internals::wait_signal();
497}
498
499bool Semaphore::start_wait(internals::ipc_signal_t sig) {
500 _lock.lock();

Callers 3

getJobMethod · 0.45
enqueueMethod · 0.45
dequeueMethod · 0.45

Calls 8

nextFunction · 0.85
wait_signalFunction · 0.85
check_signalFunction · 0.85
accept_signalsFunction · 0.85
lockMethod · 0.45
unlockMethod · 0.45
start_listenMethod · 0.45
stop_listenMethod · 0.45

Tested by

no test coverage detected