mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-07 17:15:26 +00:00
Kernel: Allow Lock to block from BlockCondition
This enables the Lock class to block a thread even while the thread is working on a BlockCondition. A thread can still only be either blocked by a Lock or a BlockCondition. This also establishes a linked list of threads that are blocked by a Lock and unblocking directly unlocks threads and wakes them directly.
This commit is contained in:
@@ -117,7 +117,9 @@ void Process::kill_threads_except_self()
|
||||
thread.set_should_die();
|
||||
});
|
||||
|
||||
big_lock().clear_waiters();
|
||||
u32 dropped_lock_count = 0;
|
||||
if (big_lock().force_unlock_if_locked(dropped_lock_count) != LockMode::Unlocked)
|
||||
dbgln("Process {} big lock had {} locks", *this, dropped_lock_count);
|
||||
}
|
||||
|
||||
void Process::kill_all_threads()
|
||||
|
||||
Reference in New Issue
Block a user