mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +00:00
Kernel: Restore state strings for block states
"Blocking" is not terribly informative, but now that everything is ported over, we can force the blocker to provide us with a reason. This does mean that to_string(State) needed to become a member, but that's OK.
This commit is contained in:
parent
b13f1699fc
commit
762333ba95
7 changed files with 37 additions and 18 deletions
|
@ -122,8 +122,9 @@ bool Thread::ReadBlocker::should_unblock(Thread&, time_t, long)
|
|||
return blocked_description()->can_read();
|
||||
}
|
||||
|
||||
Thread::ConditionBlocker::ConditionBlocker(Function<bool()> &condition)
|
||||
Thread::ConditionBlocker::ConditionBlocker(const char* state_string, Function<bool()> &condition)
|
||||
: m_block_until_condition(move(condition))
|
||||
, m_state_string(state_string)
|
||||
{
|
||||
ASSERT(m_block_until_condition);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue