aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/kmi/syscalls.h8
-rw-r--r--include/kmi/uapi.h19
2 files changed, 23 insertions, 4 deletions
diff --git a/include/kmi/syscalls.h b/include/kmi/syscalls.h
index 4319812..2701bbc 100644
--- a/include/kmi/syscalls.h
+++ b/include/kmi/syscalls.h
@@ -87,12 +87,16 @@ enum sys_code {
/** @name IPC. */
/** @{ */
/** Send IPC request as client. */
- SYS_IPC_REQ, /* IPC request to server */
+ SYS_IPC_REQ,
/** Forward IPC request from client. */
SYS_IPC_FWD,
- /** Kick request handling to someone else. */
+ /** Tail call, i.e. 'do this for me and then return to whoever called
+ * me" */
+ SYS_IPC_TAIL,
+
+ /** Kick request handling to someone else. Forwards AND does a tailcall. */
SYS_IPC_KICK,
/** IPC response from server. */
diff --git a/include/kmi/uapi.h b/include/kmi/uapi.h
index 2805a04..fa4aeae 100644
--- a/include/kmi/uapi.h
+++ b/include/kmi/uapi.h
@@ -513,9 +513,24 @@ SYSCALL_DECLARE5(ipc_req, pid, d0, d1, d2, d3);
SYSCALL_DECLARE5(ipc_fwd, pid, d0, d1, d2, d3);
/**
+ * Tail syscall.
+ *
+ * Requests that the current process doesn't get returned to in an rpc stack.
+ *
+ * @param t Current tcb.
+ * @param pid Tail target process.
+ * @param d0 First argument.
+ * @param d1 Second argument.
+ * @param d2 Third argument.
+ * @param d3 Fourth argument.
+ */
+SYSCALL_DECLARE5(ipc_tail, 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().
+ * Kicks the handling of an IPC to someone else, jumping over the
+ * current process at ipc_resp(). Effectively does a forward and a tail at the
+ * same time.
*
* 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