mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 15:34:33 +00:00
Handle signal interruptions during sleep
This commit is contained in:
parent
c2b595452e
commit
914e96b337
@ -650,9 +650,13 @@ static int linux_nanosleep(SysFrm *,
|
|||||||
|
|
||||||
while (time < sleepTime)
|
while (time < sleepTime)
|
||||||
{
|
{
|
||||||
|
if (pcb->Signals->HasPendingSignal())
|
||||||
|
{
|
||||||
|
debug("sleep interrupted by signal");
|
||||||
|
return -EINTR;
|
||||||
|
}
|
||||||
|
|
||||||
pcb->GetContext()->Yield();
|
pcb->GetContext()->Yield();
|
||||||
/* TODO: sleep should be interrupted by
|
|
||||||
the signal and return errno EINTR */
|
|
||||||
time = TimeManager->GetCounter();
|
time = TimeManager->GetCounter();
|
||||||
}
|
}
|
||||||
debug("time= %ld", time);
|
debug("time= %ld", time);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user