Remove spinlock contexts
All checks were successful
Build documentation / build-and-deploy (push) Successful in 28s

This commit is contained in:
2026-02-08 18:58:53 +01:00
parent 1ca3d11bac
commit 9e6035bd68
26 changed files with 161 additions and 262 deletions

View File

@@ -1,17 +1,10 @@
#include <libk/std.h>
#include <sync/spin_lock.h>
#include <sys/irq.h>
#include <sys/spin_lock.h>
void spin_lock (spin_lock_t* sl, spin_lock_ctx_t* ctx) {
irq_save (ctx);
void spin_lock (spin_lock_t* sl) {
while (atomic_flag_test_and_set_explicit (sl, memory_order_acquire))
spin_lock_relax ();
}
void spin_unlock (spin_lock_t* sl, spin_lock_ctx_t* ctx) {
atomic_flag_clear_explicit (sl, memory_order_release);
irq_restore (ctx);
}
void spin_unlock (spin_lock_t* sl) { atomic_flag_clear_explicit (sl, memory_order_release); }

View File

@@ -8,7 +8,7 @@
typedef atomic_flag spin_lock_t;
void spin_lock (spin_lock_t* sl, spin_lock_ctx_t* ctx);
void spin_unlock (spin_lock_t* sl, spin_lock_ctx_t* ctx);
void spin_lock (spin_lock_t* sl);
void spin_unlock (spin_lock_t* sl);
#endif // _KERNEL_SYNC_SPIN_LOCK_H