diff options
| author | Jon Santmyer <jon@jonsantmyer.com> | 2026-10-03 12:56:27 -0400 |
|---|---|---|
| committer | Jon Santmyer <jon@jonsantmyer.com> | 2026-10-03 12:56:27 -0400 |
| commit | 153ac5fa0b8c4d178bf7590f0344612c6c3eaa70 (patch) | |
| tree | 5849f36c0c97ebc90148e772ce549c615b7ea44a /sys | |
| parent | 2497a94013261d6fa9159b9c6e94abe6f2d4fd9e (diff) | |
| download | jove-kernel-153ac5fa0b8c4d178bf7590f0344612c6c3eaa70.tar.gz jove-kernel-153ac5fa0b8c4d178bf7590f0344612c6c3eaa70.tar.bz2 jove-kernel-153ac5fa0b8c4d178bf7590f0344612c6c3eaa70.zip | |
add SYSCALL_MESSAGE_SIZE
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/syscall.h | 1 | ||||
| -rw-r--r-- | sys/syscall_message.c | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/sys/syscall.h b/sys/syscall.h index ab13118..461b104 100644 --- a/sys/syscall.h +++ b/sys/syscall.h @@ -58,5 +58,6 @@ int _syscall_handle_objdir(syscall_context_t *ctx); int _syscall_handle_untyped(syscall_context_t *ctx); int _syscall_handle_pagedir(syscall_context_t *ctx); int _syscall_handle_initrd_file(syscall_context_t *ctx); +int _syscall_handle_message(syscall_context_t *ctx); #endif diff --git a/sys/syscall_message.c b/sys/syscall_message.c new file mode 100644 index 0000000..5edf33f --- /dev/null +++ b/sys/syscall_message.c @@ -0,0 +1,16 @@ +#include "api/error.h" +#include "sys/message.h" +#include "sys/syscall.h" + +int +_syscall_handle_message(syscall_context_t *ctx) +{ + switch(ctx->header->callid) { + case SYSCALL_OBJDIR_OBJTYPE: + if(ctx->target.permissions & SYSCALL_PERM_OBJDIR_OBJTYPE) + return message_len(ctx->message.obj); + return -EPERM; + default: + return -EBADCALL; + } +} |
