summaryrefslogtreecommitdiffstats
path: root/lib/libjove/syscall/invoke-objdir.c
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2025-08-19 15:04:04 -0400
committerJon Santmyer <jon@jonsantmyer.com>2025-08-19 15:04:04 -0400
commit858a52c06a4615bd58a6a906333f2ad707d41c0a (patch)
tree16870cd4d67da283567a72a74d28c04464da292a /lib/libjove/syscall/invoke-objdir.c
parent65ba015d6c1f248d36ad01a653bc49637804b15b (diff)
downloadjove-os-858a52c06a4615bd58a6a906333f2ad707d41c0a.tar.gz
jove-os-858a52c06a4615bd58a6a906333f2ad707d41c0a.tar.bz2
jove-os-858a52c06a4615bd58a6a906333f2ad707d41c0a.zip
usermode pager
Diffstat (limited to 'lib/libjove/syscall/invoke-objdir.c')
-rw-r--r--lib/libjove/syscall/invoke-objdir.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/lib/libjove/syscall/invoke-objdir.c b/lib/libjove/syscall/invoke-objdir.c
index 462c282..6ee39e4 100644
--- a/lib/libjove/syscall/invoke-objdir.c
+++ b/lib/libjove/syscall/invoke-objdir.c
@@ -22,18 +22,39 @@ _syscall_invoke_objdir_getmemb(KernelObjectDirectory *dir, uint8_t member, obj_t
}
int
-_syscall_invoke_objdir_nmemb(KernelObjectDirectory *dir, uint8_t *result)
+_syscall_invoke_objdir_lastmemb(KernelObjectDirectory *dir, uint8_t *result)
{
uint8_t *syscallData = _syscall_message_ptr;
int syscall_at = 0;
uint8_t *syscall_result;
SYSCALL_PAYLOAD_PUTOBJ(syscallData, syscall_at, dir);
- SYSCALL_PAYLOAD_PUTL(syscallData, syscall_at, INVOKE_OBJDIR_NMEMB, uint8_t);
+ SYSCALL_PAYLOAD_PUTL(syscallData, syscall_at, INVOKE_OBJDIR_LASTMEMB, uint8_t);
SYSCALL_PAYLOAD_SAVEPTR(syscallData, syscall_at, uint8_t, syscall_result);
int status = _syscall_invoke();
*result = *syscall_result;
-
return status;
}
+
+int
+_syscall_invoke_objdir_move(
+ KernelObjectDirectory *dir,
+ uint8_t memb,
+ KernelObjectDirectory *dest_dir,
+ uint8_t dest_memb)
+{
+ uint8_t *syscallData = _syscall_message_ptr;
+ int syscall_at = 0;
+
+ SYSCALL_PAYLOAD_PUTOBJ(syscallData, syscall_at, dir);
+ SYSCALL_PAYLOAD_PUTL(syscallData, syscall_at, INVOKE_OBJDIR_MOVE, uint8_t);
+ SYSCALL_PAYLOAD_PUTL(syscallData, syscall_at, memb, uint8_t);
+
+ size_t *dest_pathw = (size_t*)(syscallData + syscall_at);
+ SYSCALL_PAYLOAD_PUTOBJ(syscallData, syscall_at, dest_dir);
+ (*dest_pathw)++;
+ SYSCALL_PAYLOAD_PUTL(syscallData, syscall_at, dest_memb, uint8_t);
+
+ return _syscall_invoke();
+}