Implement Mutexes and supporting syscalls, cleanup/optimize scheduler
All checks were successful
Build documentation / build-and-deploy (push) Successful in 39s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 39s
This commit is contained in:
19
kernel/proc/mutex.h
Normal file
19
kernel/proc/mutex.h
Normal 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
|
||||
Reference in New Issue
Block a user