1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 18:05: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:
Drew Stratford 2019-09-09 15:58:42 +12:00 committed by Andreas Kling
parent e529042895
commit b65bedd610
3 changed files with 11 additions and 23 deletions

View file

@ -179,8 +179,8 @@ const char* Thread::state_string() const
case Thread::Skip0SchedulerPasses:
return "Skip0";
case Thread::Blocked:
ASSERT(!m_blockers.is_empty());
return m_blockers.first()->state_string();
ASSERT(m_blocker != nullptr);
return m_blocker->state_string();
}
kprintf("Thread::state_string(): Invalid state: %u\n", state());
ASSERT_NOT_REACHED();
@ -576,7 +576,7 @@ void Thread::set_state(State new_state)
InterruptDisabler disabler;
if (new_state == Blocked) {
// we should always have a Blocker while blocked
ASSERT(!m_blockers.is_empty());
ASSERT(m_blocker != nullptr);
}
m_state = new_state;