Implement Mutexes and supporting syscalls, cleanup/optimize scheduler
All checks were successful
Build documentation / build-and-deploy (push) Successful in 39s

This commit is contained in:
2026-01-10 00:12:42 +01:00
parent 6a474c21a0
commit 41a458b925
17 changed files with 276 additions and 73 deletions

19
kernel/proc/mutex.h Normal file
View File

@@ -0,0 +1,19 @@
#ifndef _KERNEL_PROC_MUTEX_H
#define _KERNEL_PROC_MUTEX_H
#include <libk/std.h>
#include <proc/suspension_q.h>
#include <sync/spin_lock.h>
struct proc;
struct proc_mutex {
atomic_flag flag;
struct proc_suspension_q suspension_q;
struct proc* owner;
};
void proc_mutex_lock (struct proc* proc, struct proc_mutex* mutex);
bool proc_mutex_unlock (struct proc* proc, struct proc_mutex* mutex);
#endif // _KERNEL_PROC_MUTEX_H