summaryrefslogtreecommitdiffstats
path: root/arch/x86_64/lock.c
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2026-09-17 11:11:20 -0400
committerJon Santmyer <jon@jonsantmyer.com>2026-09-17 11:11:20 -0400
commit13adbc58eb9f5eb5d6f0e4454bd005e9adbb47c8 (patch)
treea15e55bc70c60d3faa053db3b7b9a17fe75589bc /arch/x86_64/lock.c
parenta783cc865f1f261c20f6ef55cb37d4839f519865 (diff)
downloadjove-kernel-13adbc58eb9f5eb5d6f0e4454bd005e9adbb47c8.tar.gz
jove-kernel-13adbc58eb9f5eb5d6f0e4454bd005e9adbb47c8.tar.bz2
jove-kernel-13adbc58eb9f5eb5d6f0e4454bd005e9adbb47c8.zip
make syscall use non-locking mutexes
Diffstat (limited to 'arch/x86_64/lock.c')
-rw-r--r--arch/x86_64/lock.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86_64/lock.c b/arch/x86_64/lock.c
index b010ee6..a34cee6 100644
--- a/arch/x86_64/lock.c
+++ b/arch/x86_64/lock.c
@@ -11,6 +11,13 @@ take_mutex(atomic_flag *lock)
}
}
+int
+try_take_mutex(atomic_flag *lock)
+{
+ if(_kernel_panic_unlock) return 1;
+ return atomic_flag_test_and_set(lock);
+}
+
void
release_mutex(atomic_flag *lock)
{