Hi.
What happens if you call sleep(0);
Does the process give up control or does sleep just return?
TIA
Augie
Hi.
What happens if you call sleep(0);
Does the process give up control or does sleep just return?
TIA
Augie
Previously, Augie Henriques wrote in qdn.public.qnx4:
Hi.
What happens if you call sleep(0);
Does the process give up control or does sleep just return?
It returns immediately. This caught me by surprise since OS-9
(the RTOS I used to use) sleeps forever on a sleep(0). If you want
your program to wait indefinitely, use pause(). If you just want to
give up a time-slice, look at Yield().