From c5ce4978958762849083143d1fcbe694b44b5c51 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sat, 28 May 2022 12:38:15 +0300 Subject: add sys_fwd and remove sys_req_* --- common/uapi/dispatch.c | 4 ++-- common/uapi/ipc.c | 4 ++-- include/apos/syscalls.h | 4 ++-- include/apos/uapi.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/common/uapi/dispatch.c b/common/uapi/dispatch.c index 65e02a3..924a0ed 100644 --- a/common/uapi/dispatch.c +++ b/common/uapi/dispatch.c @@ -22,8 +22,8 @@ static const sys_t syscall_table[] = { /* ipc */ [SYS_IPC_SERVER] = sys_ipc_server, - [SYS_IPC_REQ_PROC] = sys_ipc_req_proc, - [SYS_IPC_REQ_THREAD] = sys_ipc_req_thread, + [SYS_IPC_REQ] = sys_ipc_req, + [SYS_IPC_FWD] = sys_ipc_fwd, [SYS_IPC_RESP] = sys_ipc_resp, /* proc */ diff --git a/common/uapi/ipc.c b/common/uapi/ipc.c index d3cbcd7..d46ba26 100644 --- a/common/uapi/ipc.c +++ b/common/uapi/ipc.c @@ -16,14 +16,14 @@ SYSCALL_DEFINE1(ipc_server)(sys_arg_t callback) return (struct sys_ret){ OK, 0 }; } -SYSCALL_DEFINE3(ipc_req_proc)(sys_arg_t pid, sys_arg_t d0, sys_arg_t d1) +SYSCALL_DEFINE3(ipc_req)(sys_arg_t pid, sys_arg_t d0, sys_arg_t d1) { struct tcb *r = get_tcb(pid); /* TODO: something like jump_to_callback(t) */ return (struct sys_ret){ d0, d1 }; } -SYSCALL_DEFINE3(ipc_req_thread)(sys_arg_t tid, sys_arg_t d0, sys_arg_t d1) +SYSCALL_DEFINE3(ipc_fwd)(sys_arg_t tid, sys_arg_t d0, sys_arg_t d1) { struct tcb *t = get_tcb(tid); /* ditto */ diff --git a/include/apos/syscalls.h b/include/apos/syscalls.h index e1513c4..7e2845b 100644 --- a/include/apos/syscalls.h +++ b/include/apos/syscalls.h @@ -30,8 +30,8 @@ enum { * structure of the OS, but these following syscalls are probably * required */ SYS_IPC_SERVER, /* inform kernel that process should be treated as a server */ - SYS_IPC_REQ_PROC, /* IPC request to server on behalf of process */ - SYS_IPC_REQ_THREAD, /* IPC request to server on behalf of thread */ + SYS_IPC_REQ, /* IPC request to server */ + SYS_IPC_FWD, /* IPC request forwarding */ SYS_IPC_RESP, /* IPC response from server */ /* process management */ diff --git a/include/apos/uapi.h b/include/apos/uapi.h index dc20187..9304da7 100644 --- a/include/apos/uapi.h +++ b/include/apos/uapi.h @@ -99,8 +99,8 @@ SYSCALL_DECLARE(free_timer); /* ipc */ SYSCALL_DECLARE(ipc_server); -SYSCALL_DECLARE(ipc_req_proc); -SYSCALL_DECLARE(ipc_req_thread); +SYSCALL_DECLARE(ipc_req); +SYSCALL_DECLARE(ipc_fwd); SYSCALL_DECLARE(ipc_resp); /* proc */ -- cgit v1.3