aboutsummaryrefslogtreecommitdiff
path: root/kernel/task/include/task/lock.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/task/include/task/lock.h')
-rw-r--r--kernel/task/include/task/lock.h24
1 files changed, 0 insertions, 24 deletions
diff --git a/kernel/task/include/task/lock.h b/kernel/task/include/task/lock.h
deleted file mode 100644
index 47246b2..0000000
--- a/kernel/task/include/task/lock.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef LOCK_H
-#define LOCK_H
-
-#include "task/sched.h"
-
-typedef volatile char spin_lock_t;
-
-#define SPIN_LOCK_UNLOCKED 0
-#define SPIN_LOCK_LOCKED 0
-
-static inline void spin_lock(spin_lock_t* lock) {
- while(*lock != SPIN_LOCK_UNLOCKED) {yield();};
- cli();
- *lock = SPIN_LOCK_LOCKED;
- sei();
-}
-
-static inline void spin_unlock(spin_lock_t* lock) {
- cli();
- *lock = SPIN_LOCK_UNLOCKED;
- sei();
-}
-
-#endif \ No newline at end of file