From ddc4fbc15223e362896a9f42beca73f05f48e664 Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Thu, 18 Sep 2025 13:52:58 -0400 Subject: move usermode-critical info to include/api --- include/api/syscall.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 include/api/syscall.h (limited to 'include/api/syscall.h') diff --git a/include/api/syscall.h b/include/api/syscall.h new file mode 100644 index 0000000..3ce5886 --- /dev/null +++ b/include/api/syscall.h @@ -0,0 +1,45 @@ +#ifndef _JOVE_API_SYSCALL_H +#define _JOVE_API_SYSCALL_H 1 + +enum +{ + SYSCALL_NONE = 0, + SYSCALL_INVOKE, + SYSCALL_SEND, + SYSCALL_RECV, + + SYSCALL_DEBUG_PUTC +}; + +/* Generic payload of SYSCALL_INVOKE: + * [size_t n][ n bytes ][ uint8_t ][ payload ] + * target entry funcid + * */ + +/**@ENUM objdir invokes*/ +enum +{ + /*[target path][u8 funcid][u8 memb]*/ + INVOKE_OBJDIR_GETMEMB, + /*[target path][u8 funcid]*/ + INVOKE_OBJDIR_LASTMEMB, + /*[target path][u8 funcid][u8 memb]*/ + INVOKE_OBJDIR_MOVE +}; +/**@ENUM untyped invokes*/ +enum +{ + /*[target path][u8 funcid][size_t ret]*/ + INVOKE_UNTYPED_SIZE = 0, + /*[target path][u8 funcid][dest path][dest bytes]*/ + INVOKE_UNTYPED_SPLIT, + /*[first path][u8 funcid][second path]*/ + INVOKE_UNTYPED_MERGE, + /*[target path][u8 funcid][size_t ret]*/ + INVOKE_UNTYPED_ALIGNMENT, + /*[target path][u8 funcid][u16 type]*/ + INVOKE_UNTYPED_RETYPE, +}; + + +#endif -- cgit v1.2.1