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
commit 65cb406327
Notes: sideshowbarker 2024-07-19 10:04:23 +09:00
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; }