Use clang-format
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
#include <libk/std.h>
|
||||
#include <sys/spin_lock.h>
|
||||
#include <sync/spin_lock.h>
|
||||
#include <sys/spin_lock.h>
|
||||
|
||||
void spin_lock(spin_lock_t *sl) {
|
||||
while (atomic_flag_test_and_set_explicit(sl, memory_order_acquire))
|
||||
spin_lock_relax();
|
||||
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) {
|
||||
atomic_flag_clear_explicit(sl, memory_order_release);
|
||||
void spin_unlock (spin_lock_t* sl) {
|
||||
atomic_flag_clear_explicit (sl, memory_order_release);
|
||||
}
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
|
||||
#include <libk/std.h>
|
||||
|
||||
#define SPIN_LOCK_INIT ATOMIC_FLAG_INIT
|
||||
#define SPIN_LOCK_INIT ATOMIC_FLAG_INIT
|
||||
|
||||
typedef atomic_flag spin_lock_t;
|
||||
|
||||
void spin_lock(spin_lock_t *sl);
|
||||
void spin_unlock(spin_lock_t *sl);
|
||||
void spin_lock (spin_lock_t* sl);
|
||||
void spin_unlock (spin_lock_t* sl);
|
||||
|
||||
#endif // _KERNEL_SYNC_SPIN_LOCK_H
|
||||
|
||||
Reference in New Issue
Block a user