mirror of
https://github.com/RGBCube/serenity
synced 2025-07-02 23:22:07 +00:00
Thread: Return a result from block() indicating why the block terminated
And use this to return EINTR in various places; some of which we were not handling properly before. This might expose a few bugs in userspace, but should be more compatible with other POSIX systems, and is certainly a little cleaner.
This commit is contained in:
parent
56217c7432
commit
833d444cd8
9 changed files with 73 additions and 38 deletions
|
@ -309,7 +309,8 @@ bool Scheduler::pick_next()
|
|||
return IterationDecision::Continue;
|
||||
if (was_blocked) {
|
||||
dbgprintf("Unblock %s(%u) due to signal\n", thread.process().name().characters(), thread.pid());
|
||||
thread.m_was_interrupted_while_blocked = true;
|
||||
ASSERT(thread.m_blocker);
|
||||
thread.m_blocker->set_interrupted_by_signal();
|
||||
thread.unblock();
|
||||
}
|
||||
return IterationDecision::Continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue