From dd0667da66cb007c8be2b641e1663ce464b7e1cb Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Thu, 4 Apr 2019 21:11:29 -0400 Subject: [PATCH] kernel/locks: Don't panic on interrupts disabled in unlock(). We don't reschedule or block in here, so checking for interrupts is needlessly strict. Sorry for the noise, forgot to remove this before the previous commit. --- src/system/kernel/locks/lock.cpp | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/system/kernel/locks/lock.cpp b/src/system/kernel/locks/lock.cpp index d7f4653f95..3ab0e49932 100644 --- a/src/system/kernel/locks/lock.cpp +++ b/src/system/kernel/locks/lock.cpp @@ -437,13 +437,6 @@ _rw_lock_read_lock_with_timeout(rw_lock* lock, uint32 timeoutFlags, void _rw_lock_read_unlock(rw_lock* lock) { -#if KDEBUG - if (!gKernelStartup && !are_interrupts_enabled()) { - panic("_rw_lock_read_unlock(): called with interrupts disabled for lock %p", - lock); - } -#endif - InterruptsSpinLocker locker(lock->lock); // If we're still holding the write lock or if there are other readers, @@ -517,13 +510,6 @@ rw_lock_write_lock(rw_lock* lock) void _rw_lock_write_unlock(rw_lock* lock) { -#if KDEBUG - if (!gKernelStartup && !are_interrupts_enabled()) { - panic("_rw_lock_write_unlock(): called with interrupts disabled for lock %p", - lock); - } -#endif - InterruptsSpinLocker locker(lock->lock); if (thread_get_current_thread_id() != lock->holder) {