From a26fb216729ba7a7d0fbfc97c2082c9db512aa36 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Thu, 27 Jul 2023 18:39:54 +0300 Subject: add ipc_kick + Tests will have to come later --- include/kmi/syscalls.h | 3 +++ include/kmi/uapi.h | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+) (limited to 'include') diff --git a/include/kmi/syscalls.h b/include/kmi/syscalls.h index bb7891b..8ca6546 100644 --- a/include/kmi/syscalls.h +++ b/include/kmi/syscalls.h @@ -83,6 +83,9 @@ enum { /** Forward IPC request from client. */ SYS_IPC_FWD, + /** Kick request handling to someone else. */ + SYS_IPC_KICK, + /** IPC response from server. */ SYS_IPC_RESP, diff --git a/include/kmi/uapi.h b/include/kmi/uapi.h index ad4369f..526738a 100644 --- a/include/kmi/uapi.h +++ b/include/kmi/uapi.h @@ -551,6 +551,30 @@ SYSCALL_DECLARE5(ipc_req, pid, d0, d1, d2, d3); */ SYSCALL_DECLARE5(ipc_fwd, pid, d0, d1, d2, d3); +/** + * Kicking syscall. + * Kicks the handling of an IPC req/fwd to someone else, jumping over the + * current process at ipc_resp(). + * + * I'm imagining that this is useful in cases where an init process connects a + * client to another server, and kicks the actual request handling to the + * server. Note that ipc_resp() returning the ID of the process that handled a + * request is useful in case the client and server should continue communicating + * with eachother instead of going through init every time. + * + * Otherwise identical to ipc_fwd(). + * + * @param t Current tcb. + * @param pid Process to kick req/fwd to. + * @param d0 First argument. + * @param d1 Second argument. + * @param d2 Third argument. + * @param d3 Fourth argument. + * + * Doesn't return. + */ +SYSCALL_DECLARE5(ipc_kick, pid, d0, d1, d2, d3); + /** * Response syscall. * -- cgit v1.3