1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:17:34 +00:00

Kernel: Allow unlocking a held Lock with interrupts disabled

This is needed to eliminate a race in Thread::wait_on() where we'd
otherwise have to wait until after unlocking the process lock before
we can disable interrupts.
This commit is contained in:
Andreas Kling 2020-01-12 22:53:20 +01:00
parent 2a8de4cdec
commit 65cb406327
4 changed files with 18 additions and 33 deletions

View file

@ -21,7 +21,7 @@ public:
void lock();
void unlock();
bool unlock_if_locked();
bool force_unlock_if_locked();
bool is_locked() const { return m_holder; }
const char* name() const { return m_name; }