From d99be9e2912e0726ab779053b43a89e3b9e21490 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 22 May 2022 21:14:29 +0300 Subject: rename vm_branch to vmem + Closer to what it's for rather than what it is. --- include/apos/debug.h | 2 +- include/apos/dmem.h | 4 ++-- include/apos/mem_regions.h | 4 ++-- include/apos/proc.h | 2 +- include/apos/tcb.h | 2 +- include/apos/vmem.h | 6 +++--- 6 files changed, 10 insertions(+), 10 deletions(-) (limited to 'include/apos') diff --git a/include/apos/debug.h b/include/apos/debug.h index 25ea132..8df7342 100644 --- a/include/apos/debug.h +++ b/include/apos/debug.h @@ -136,7 +136,7 @@ void __fmt(1, 2) dbg(const char *fmt, ...); void init_dbg(const void *fdt); void setup_dmap_dbg(); -void setup_io_dbg(struct vm_branch *b); +void setup_io_dbg(struct vmem *b); void setup_dbg(pm_t pt, enum serial_dev dev); struct dbg_info dbg_from_fdt(const void *fdt); diff --git a/include/apos/dmem.h b/include/apos/dmem.h index 3ee93b6..59083cb 100644 --- a/include/apos/dmem.h +++ b/include/apos/dmem.h @@ -13,9 +13,9 @@ stat_t init_devmem(pm_t ram_base, pm_t ram_top); vm_t alloc_devmem(struct tcb *t, pm_t dev_start, size_t bytes, vmflags_t flags); stat_t free_devmem(struct tcb *t, vm_t dev_start); -stat_t dev_free_wrapper(struct vm_branch *b, pm_t *offset, vm_t vaddr, +stat_t dev_free_wrapper(struct vmem *b, pm_t *offset, vm_t vaddr, vmflags_t flags, enum mm_order t, void *); -stat_t dev_alloc_wrapper(struct vm_branch *b, pm_t *offset, vm_t vaddr, +stat_t dev_alloc_wrapper(struct vmem *b, pm_t *offset, vm_t vaddr, vmflags_t flags, enum mm_order t, void *); #endif /* APOS_DEV_H */ diff --git a/include/apos/mem_regions.h b/include/apos/mem_regions.h index 9f09eff..2d777a9 100644 --- a/include/apos/mem_regions.h +++ b/include/apos/mem_regions.h @@ -44,11 +44,11 @@ struct mem_region *find_closest_used_region(struct mem_region_root *r, struct mem_region *find_free_region(struct mem_region_root *r, size_t size, size_t *align); -typedef stat_t region_callback_t(struct vm_branch *b, pm_t *offset, vm_t vaddr, +typedef stat_t region_callback_t(struct vmem *b, pm_t *offset, vm_t vaddr, vmflags_t flags, enum mm_order order, void *data); -vm_t map_fill_region(struct vm_branch *b, region_callback_t *mem_handler, +vm_t map_fill_region(struct vmem *b, region_callback_t *mem_handler, pm_t offset, vm_t start, size_t bytes, vmflags_t flags, void *data); diff --git a/include/apos/proc.h b/include/apos/proc.h index e1ea7b6..238e0f6 100644 --- a/include/apos/proc.h +++ b/include/apos/proc.h @@ -5,6 +5,6 @@ #include stat_t jump_to_userspace(struct tcb *t, int argc, char **argv); -stat_t init_proc(void *fdt, struct vm_branch *b); +stat_t init_proc(void *fdt, struct vmem *b); #endif /* APOS_PROC_H */ diff --git a/include/apos/tcb.h b/include/apos/tcb.h index f31bf77..439a3c9 100644 --- a/include/apos/tcb.h +++ b/include/apos/tcb.h @@ -37,7 +37,7 @@ struct tcb { vm_t entry; /* vm root branch */ - struct vm_branch *b_r; + struct vmem *b_r; /* linked list of threads in this process */ struct tcb *next; diff --git a/include/apos/vmem.h b/include/apos/vmem.h index 036780f..d55e249 100644 --- a/include/apos/vmem.h +++ b/include/apos/vmem.h @@ -16,11 +16,11 @@ stat_t free_uvmem(struct tcb *r, vm_t a); stat_t init_uvmem(struct tcb *r, vm_t base, vm_t top); stat_t destroy_uvmem(struct tcb *r); -stat_t alloc_uvmem_wrapper(struct vm_branch *b, pm_t *offset, vm_t vaddr, +stat_t alloc_uvmem_wrapper(struct vmem *b, pm_t *offset, vm_t vaddr, vmflags_t flags, enum mm_order order, void *data); -stat_t alloc_shared_wrapper(struct vm_branch *b, pm_t *offset, vm_t vaddr, +stat_t alloc_shared_wrapper(struct vmem *b, pm_t *offset, vm_t vaddr, vmflags_t flags, enum mm_order order, void *data); -stat_t free_uvmem_wrapper(struct vm_branch *b, pm_t *offset, vm_t vaddr, +stat_t free_uvmem_wrapper(struct vmem *b, pm_t *offset, vm_t vaddr, vmflags_t flags, enum mm_order order, void *data); #define map_allocd_region(b, start, bytes, flags, data) \ -- cgit v1.3