Redesign userspace memory management
All checks were successful
Build documentation / build-and-deploy (push) Successful in 44s

This commit is contained in:
2026-01-27 17:04:08 +01:00
parent 600886a7ee
commit b388b30b24
23 changed files with 195 additions and 484 deletions

View File

@@ -4,11 +4,9 @@
#include <libk/list.h>
#include <libk/rbtree.h>
#include <libk/std.h>
#include <proc/mem.h>
#include <proc/mutex.h>
#include <sync/spin_lock.h>
#define PR_MEM 0
#define PR_MUTEX 1
struct proc;
@@ -21,7 +19,6 @@ struct proc_resource {
spin_lock_t lock;
struct rb_node_link resource_tree_link;
union {
struct proc_resource_mem mem;
struct proc_mutex mutex;
} u;
struct {
@@ -30,8 +27,6 @@ struct proc_resource {
};
struct proc_resource* proc_find_resource (struct procgroup* procgroup, int rid);
struct proc_resource* proc_create_resource_mem (struct procgroup* procgroup, int rid, size_t pages,
uintptr_t paddr, bool managed);
struct proc_resource* proc_create_resource_mutex (struct procgroup* procgroup, int rid);
void proc_resource_unlink (struct proc_resource* resource);