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:
@@ -7,6 +7,7 @@
|
||||
#include <libk/rbtree.h>
|
||||
#include <libk/std.h>
|
||||
#include <proc/resource.h>
|
||||
#include <proc/suspension_q.h>
|
||||
#include <sync/spin_lock.h>
|
||||
#include <sys/mm.h>
|
||||
|
||||
@@ -39,6 +40,7 @@ struct proc {
|
||||
struct rb_node_link proc_tree_link;
|
||||
struct rb_node_link cpu_run_q_link;
|
||||
struct rb_node_link suspension_link;
|
||||
struct list_node_link reap_link;
|
||||
|
||||
struct list_node_link* mappings; /* pd.lock implicitly protects this field */
|
||||
struct proc_platformdata pdata;
|
||||
@@ -51,12 +53,8 @@ struct proc {
|
||||
struct proc_suspension_q* suspension_q;
|
||||
};
|
||||
|
||||
struct proc_suspension_q {
|
||||
struct rb_node_link* proc_tree;
|
||||
spin_lock_t lock;
|
||||
};
|
||||
|
||||
void proc_suspend (struct proc* proc, struct proc_suspension_q* sq);
|
||||
void proc_resume (struct proc* proc);
|
||||
void proc_sched (void);
|
||||
void proc_kill (struct proc* proc);
|
||||
bool proc_map (struct proc* proc, uintptr_t start_paddr, uintptr_t start_vaddr, size_t pages,
|
||||
|
||||
Reference in New Issue
Block a user