diff options
author | Tom <tomut@yahoo.com> | 2020-11-30 19:04:36 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-12-01 09:48:34 +0100 |
commit | 78f1b5e359f1436f90d1c54929be30c0e41d8df0 (patch) | |
tree | 439c4da3f7c26779775ebb2a2150141f67330d53 /Kernel/Arch | |
parent | 9e32d79e02c84c0130c9fe1b143b445ac9093079 (diff) | |
download | serenity-78f1b5e359f1436f90d1c54929be30c0e41d8df0.zip |
Kernel: Fix some problems with Thread::wait_on and Lock
This changes the Thread::wait_on function to not enable interrupts
upon leaving, which caused some problems with page fault handlers
and in other situations. It may now be called from critical
sections, with interrupts enabled or disabled, and returns to the
same state.
This also requires some fixes to Lock. To aid debugging, a new
define LOCK_DEBUG is added that enables checking for Lock leaks
upon finalization of a Thread.
Diffstat (limited to 'Kernel/Arch')
-rw-r--r-- | Kernel/Arch/i386/CPU.h | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/Kernel/Arch/i386/CPU.h b/Kernel/Arch/i386/CPU.h index 9ae0f3941b..9f6a6b9d1c 100644 --- a/Kernel/Arch/i386/CPU.h +++ b/Kernel/Arch/i386/CPU.h @@ -1052,14 +1052,6 @@ public: return *this; } - void set_interrupt_flag_on_destruction(bool flag) - { - if (flag) - m_prev_flags |= 0x200; - else - m_prev_flags &= ~0x200; - } - void leave() { ASSERT(m_valid); |