summaryrefslogtreecommitdiffstats
path: root/arch/x86_64/lock.c
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2026-10-07 17:37:26 -0400
committerJon Santmyer <jon@jonsantmyer.com>2026-10-07 17:37:26 -0400
commit434ddcd907832b1febc7d70e4faa52109c7eb3bd (patch)
tree00c1ade91f9806d831f10e6006732b294e73f613 /arch/x86_64/lock.c
parent8d48bbd9746228b63bafa5f92b621998d7d8f3d3 (diff)
downloadjove-kernel-434ddcd907832b1febc7d70e4faa52109c7eb3bd.tar.gz
jove-kernel-434ddcd907832b1febc7d70e4faa52109c7eb3bd.tar.bz2
jove-kernel-434ddcd907832b1febc7d70e4faa52109c7eb3bd.zip
add memory region object for better memory managment
Diffstat (limited to 'arch/x86_64/lock.c')
-rw-r--r--arch/x86_64/lock.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/arch/x86_64/lock.c b/arch/x86_64/lock.c
deleted file mode 100644
index a34cee6..0000000
--- a/arch/x86_64/lock.c
+++ /dev/null
@@ -1,25 +0,0 @@
-#include "lock.h"
-
-extern int _kernel_panic_unlock;
-
-void
-take_mutex(atomic_flag *lock)
-{
- if(_kernel_panic_unlock) return;
- while(atomic_flag_test_and_set(lock)) {
- __builtin_ia32_pause();
- }
-}
-
-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)
-{
- atomic_flag_clear(lock);
-}