aboutsummaryrefslogtreecommitdiff
path: root/include/apos/vmem.h
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2022-01-07 17:33:55 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2022-01-07 17:33:55 +0200
commitebe6fe5d44d58fcb1b9d0ac52fa98a0a3ff309a7 (patch)
tree1273c7815d6790e746f6e7ecfcd464e5cab39f2e /include/apos/vmem.h
parentbe78fcb0acc665d4db8edb9cda53f6863d27dd85 (diff)
downloadkmi-ebe6fe5d44d58fcb1b9d0ac52fa98a0a3ff309a7.tar.gz
kmi-ebe6fe5d44d58fcb1b9d0ac52fa98a0a3ff309a7.zip
Steps towards better status/debugging control
Diffstat (limited to 'include/apos/vmem.h')
-rw-r--r--include/apos/vmem.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/include/apos/vmem.h b/include/apos/vmem.h
index bd6b89e..083df87 100644
--- a/include/apos/vmem.h
+++ b/include/apos/vmem.h
@@ -2,22 +2,18 @@
#define APOS_VMEM_H
#include <apos/tcb.h>
+#include <apos/mem.h>
#include <apos/pmem.h>
#include <apos/sp_tree.h>
-#include <arch/vmem.h>
-vm_t alloc_uvmem(struct tcb *r, size_t size, uint8_t flags);
-vm_t alloc_fixed_uvmem(struct tcb *r, vm_t start, size_t size, uint8_t flags);
+vm_t alloc_uvmem(struct tcb *r, size_t size, vmflags_t flags);
+vm_t alloc_fixed_uvmem(struct tcb *r, vm_t start, size_t size, vmflags_t flags);
stat_t free_uvmem(struct tcb *r, vm_t a);
stat_t init_uvmem(struct tcb *r, vm_t base, vm_t top);
-vm_t map_fill_region(struct vm_branch *b,
- int (*vmem_handler)(struct vm_branch *, pm_t *, vm_t, uint8_t, enum mm_order),
- pm_t offset, vm_t start, size_t bytes, uint8_t flags);
-
-stat_t alloc_uvmem_wrapper(struct vm_branch *b, pm_t *offset, vm_t vaddr, uint8_t flags, enum mm_order order);
-stat_t free_uvmem_wrapper(struct vm_branch *b, pm_t *offset, vm_t vaddr, uint8_t flags, enum mm_order order);
+stat_t alloc_uvmem_wrapper(struct vm_branch *b, pm_t *offset, vm_t vaddr, vmflags_t flags, enum mm_order order);
+stat_t free_uvmem_wrapper(struct vm_branch *b, pm_t *offset, vm_t vaddr, vmflags_t flags, enum mm_order order);
#define map_allocd_region(b, start, bytes, flags)\
map_fill_region(b, &alloc_uvmem_wrapper, 0, start, bytes, flags)