diff options
author | Ian Moffett <ian@osmora.org> | 2024-02-29 13:23:55 -0500 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-02-29 13:23:55 -0500 |
commit | 1805ea2e59d90e0d14636fbac362af4e6f924d85 (patch) | |
tree | e82c1d1c02273d912c6b970daf3844d732d12e29 /sys/vm | |
parent | 60e0827762b4cfff1a04d1287139fb23f521ff86 (diff) |
kernel: vm: vm_get_bsp_ctx() -> vm_get_ctx()
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_dynalloc.c | 6 | ||||
-rw-r--r-- | sys/vm/vm_init.c | 2 | ||||
-rw-r--r-- | sys/vm/vm_map.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/vm/vm_dynalloc.c b/sys/vm/vm_dynalloc.c index e1b61c7..8ec7aed 100644 --- a/sys/vm/vm_dynalloc.c +++ b/sys/vm/vm_dynalloc.c @@ -39,7 +39,7 @@ void * dynalloc(size_t sz) { /* TODO: Per CPU */ - struct vm_ctx *vm_ctx = vm_get_bsp_ctx(); + struct vm_ctx *vm_ctx = vm_get_ctx(); void *tmp; spinlock_acquire(&vm_ctx->dynalloc_lock); @@ -58,7 +58,7 @@ void * dynrealloc(void *old_ptr, size_t newsize) { /* TODO: Per CPU */ - struct vm_ctx *vm_ctx = vm_get_bsp_ctx(); + struct vm_ctx *vm_ctx = vm_get_ctx(); void *tmp; spinlock_acquire(&vm_ctx->dynalloc_lock); @@ -76,7 +76,7 @@ void dynfree(void *ptr) { /* TODO: Per CPU */ - struct vm_ctx *vm_ctx = vm_get_bsp_ctx(); + struct vm_ctx *vm_ctx = vm_get_ctx(); spinlock_acquire(&vm_ctx->dynalloc_lock); tlsf_free(vm_ctx->tlsf_ctx, ptr); diff --git a/sys/vm/vm_init.c b/sys/vm/vm_init.c index 2a704fe..f15cb0b 100644 --- a/sys/vm/vm_init.c +++ b/sys/vm/vm_init.c @@ -54,7 +54,7 @@ volatile struct limine_hhdm_request g_hhdm_request = { }; struct vm_ctx * -vm_get_bsp_ctx(void) +vm_get_ctx(void) { return &bsp_vm_ctx; } diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 0002dde..b3c89ab 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -81,11 +81,11 @@ vm_map_create(vaddr_t va, paddr_t pa, vm_prot_t prot, size_t bytes) int s; /* - * TODO: This needs to be changed, once vm_get_bsp_ctx() + * TODO: This needs to be changed, once vm_get_ctx() * is no longer used, we'll need to fetch it from * the current process! */ - struct vm_ctx *ctx = vm_get_bsp_ctx(); + struct vm_ctx *ctx = vm_get_ctx(); /* We want bytes to be aligned by the granule */ bytes = __ALIGN_UP(bytes, granule); |