timekeeper: redo timekeeping

This commit is contained in:
Matheus
2024-09-29 11:20:40 -03:00
parent bb910d9e20
commit b8acbc5bcd
12 changed files with 280 additions and 96 deletions
+1
View File
@@ -7,6 +7,7 @@
typedef int spinlock_t;
#define SPINLOCK_INIT(x) x = 0;
#define SPINLOCK_INIT_VALUE 0
static inline void spinlock_acquire(spinlock_t *lock){
while(!__sync_bool_compare_and_swap(lock, 0, 1)) asm("pause");