summaryrefslogtreecommitdiff
path: root/kernel/memory/virtalloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/memory/virtalloc.h')
-rw-r--r--kernel/memory/virtalloc.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/memory/virtalloc.h b/kernel/memory/virtalloc.h
index 9a94208..5033242 100644
--- a/kernel/memory/virtalloc.h
+++ b/kernel/memory/virtalloc.h
@@ -65,6 +65,14 @@ int virtaddr_clone(struct virt_ctx *old, struct virt_ctx *new);
void *virtaddr_alloc(struct virt_ctx *ctx, int pages);
/**
+ * Take (yoink) a predefined virtual address of length x pages
+ * @param virt - the start of the vitural address to take
+ * @param pages - x pages
+ * @returns 0 on success, 1 on err
+ */
+int virtaddr_take(struct virt_ctx *ctx, const void *virt, int pages);
+
+/**
* Free the virtual address from virtaddr_alloc
* @param virtaddr - the addr to free
* @returns number of pages used for virtaddr