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
+5
View File
@@ -23,6 +23,11 @@ typedef struct semaphore_t{
(x)->head = NULL; \
}
#define SEMAPHORE_DEFINE(x, v) semaphore_t x = { \
.i = v, \
.lock = SPINLOCK_INIT_VALUE \
}
int semaphore_wait(semaphore_t *sem, bool interruptible);
int semaphore_timedwait(semaphore_t *sem, time_t timeoutusec, bool interruptible);