mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 07:15:07 +00:00
Kernel: Change m_blockers to m_blocker.
Because of the way signals now work there should not be more than one blocker per thread. This changes the blocker and thread class to reflect that.
This commit is contained in:
parent
e529042895
commit
b65bedd610
3 changed files with 11 additions and 23 deletions
|
@ -243,8 +243,8 @@ void Thread::consider_unblock(time_t now_sec, long now_usec)
|
|||
/* don't know, don't care */
|
||||
return;
|
||||
case Thread::Blocked:
|
||||
ASSERT(!m_blockers.is_empty());
|
||||
if (m_blockers.first()->should_unblock(*this, now_sec, now_usec))
|
||||
ASSERT(m_blocker != nullptr);
|
||||
if (m_blocker->should_unblock(*this, now_sec, now_usec))
|
||||
unblock();
|
||||
return;
|
||||
case Thread::Skip1SchedulerPass:
|
||||
|
@ -329,8 +329,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());
|
||||
ASSERT(!thread.m_blockers.is_empty());
|
||||
thread.m_blockers.first()->set_interrupted_by_signal();
|
||||
ASSERT(thread.m_blocker != nullptr);
|
||||
thread.m_blocker->set_interrupted_by_signal();
|
||||
thread.unblock();
|
||||
}
|
||||
return IterationDecision::Continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue