mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-25 09:04:53 +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:
committed by
Andreas Kling
parent
e529042895
commit
b65bedd610
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user