summaryrefslogtreecommitdiff
path: root/Kernel/Scheduler.cpp
diff options
context:
space:
mode:
authorRobin Burchell <robin+git@viroteck.net>2019-07-20 11:05:52 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-07-20 12:15:24 +0200
commit833d444cd806c490041da4420f5286e59c1c5ed4 (patch)
treeacff2c67ca6cc2e7daefe8b5279d85bf2e97ce97 /Kernel/Scheduler.cpp
parent56217c743260d6db839ccb3ce8f99b14d7973627 (diff)
downloadserenity-833d444cd806c490041da4420f5286e59c1c5ed4.zip
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.
Diffstat (limited to 'Kernel/Scheduler.cpp')
-rw-r--r--Kernel/Scheduler.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Kernel/Scheduler.cpp b/Kernel/Scheduler.cpp
index fbae58cd0b..9c9069238e 100644
--- a/Kernel/Scheduler.cpp
+++ b/Kernel/Scheduler.cpp
@@ -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;