diff options
| author | Jon Santmyer <jon@jonsantmyer.com> | 2026-10-04 10:49:41 -0400 |
|---|---|---|
| committer | Jon Santmyer <jon@jonsantmyer.com> | 2026-10-04 10:49:41 -0400 |
| commit | 8d48bbd9746228b63bafa5f92b621998d7d8f3d3 (patch) | |
| tree | fbaba69059c2e28d5098da4c9be357c38e406626 /api | |
| parent | 465cba0c00bfc5d89bf10ce353b0adf40bdc098d (diff) | |
| download | jove-kernel-8d48bbd9746228b63bafa5f92b621998d7d8f3d3.tar.gz jove-kernel-8d48bbd9746228b63bafa5f92b621998d7d8f3d3.tar.bz2 jove-kernel-8d48bbd9746228b63bafa5f92b621998d7d8f3d3.zip | |
move init fully to proc. remove init pages prealloc. prepare for scheduling
Diffstat (limited to 'api')
| -rw-r--r-- | api/error.h | 3 | ||||
| -rw-r--r-- | api/process.h | 8 | ||||
| -rw-r--r-- | api/syscall.h | 40 |
3 files changed, 51 insertions, 0 deletions
diff --git a/api/error.h b/api/error.h index de7d4b2..af85bd9 100644 --- a/api/error.h +++ b/api/error.h @@ -18,5 +18,8 @@ #define EOVERFLOW 15 #define EBADCALL 16 #define EPERM 17 +#define EBADPROC 18 +#define ENOMAIL 19 +#define ETIMEOUT 20 #endif diff --git a/api/process.h b/api/process.h new file mode 100644 index 0000000..080e001 --- /dev/null +++ b/api/process.h @@ -0,0 +1,8 @@ +#ifndef _JOVE_API_PROCESS_H +#define _JOVE_API_PROCESS_H 1 + +#include <stdint.h> + +typedef intmax_t pid_t; + +#endif diff --git a/api/syscall.h b/api/syscall.h index a116177..2502621 100644 --- a/api/syscall.h +++ b/api/syscall.h @@ -4,6 +4,7 @@ #include <stddef.h> #include <stdint.h> +#include "process.h" #include "obj.h" /* General syscall behavior: @@ -123,6 +124,45 @@ struct syscall_pagedir_unmap objpath_part_t none_path[]; }; +/**JOVE_OBJ_PCB syscalls. + * */ + +enum +{ + _SYSCALL_PCB_NONE = 0, + SYSCALL_PCB_YIELD, + SYSCALL_PCB_SEND, + SYSCALL_PCB_RECV +}; + +#define SYSCALL_PERM_PCB_YIELD (JOVE_PERM_WRITE) +#define SYSCALL_PERM_PCB_SEND (JOVE_PERM_MUTATE) +#define SYSCALL_PERM_PCB_RECV (JOVE_PERM_MUTATE) + +#define SYSCALL_PERM_PCB_SEND_TGT (JOVE_PERM_MUTATE) +#define SYSCALL_PERM_PCB_RECV_DST (JOVE_PERM_MUTATE) + +struct syscall_pcb_yield +{ + pid_t yield_target; +}; + +struct syscall_pcb_send +{ + pid_t send_target; + uintmax_t send_timeout; + uint16_t send_path_length; + objpath_part_t send_path[]; +}; + +struct syscall_pcb_recv +{ + pid_t recv_target; + uintmax_t recv_timeout; + uint16_t recv_path_length; + objpath_part_t recv_path[]; +}; + /**JOVE_OBJ_INITRD_FILE syscalls * */ |
