From 3d0c30e6697b2b6ae77a03adefa2a8b81ebe4d92 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 21 Mar 2021 14:31:08 +0100 Subject: Cleaner shared memory implementation --- kernel/inc/mm.h | 5 +++-- kernel/inc/proc.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'kernel/inc') diff --git a/kernel/inc/mm.h b/kernel/inc/mm.h index 5e49aa7..ae4e962 100644 --- a/kernel/inc/mm.h +++ b/kernel/inc/mm.h @@ -117,8 +117,9 @@ u8 memory_is_user(u32 addr); u8 memory_valid(const void *addr); // User interface -res memory_shalloc(struct page_dir *dir, u32 size, u32 *id, u32 flags); -res memory_shaccess(struct page_dir *dir, u32 shid, u32 *addr, u32 *size); +res memory_sys_alloc(struct page_dir *dir, u32 size, u32 *addr, u32 *id, u8 shared); +res memory_sys_free(struct page_dir *dir, u32 addr); +res memory_sys_shaccess(struct page_dir *dir, u32 id, u32 *addr, u32 *size); void memory_install(struct mem_info *mem_info, struct vid_info *vid_info); diff --git a/kernel/inc/proc.h b/kernel/inc/proc.h index c946116..eb972d3 100644 --- a/kernel/inc/proc.h +++ b/kernel/inc/proc.h @@ -56,6 +56,7 @@ struct proc { struct proc_wait wait; // dev_id enum proc_state state; struct stack *messages; + struct list *memory; }; void scheduler(struct regs *regs); -- cgit v1.2.3