aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-08-30 18:50:51 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2024-08-30 18:50:51 +0300
commit712a15ce6c5fdf9c5156a5954cd6c3551547037c (patch)
tree11b3736a6569e8408af7fbd11fa716bb3d6e87f9 /src
parentcb1fd73f6b76c2297772f6faccb9b46b99f55e2c (diff)
downloadkmi-712a15ce6c5fdf9c5156a5954cd6c3551547037c.tar.gz
kmi-712a15ce6c5fdf9c5156a5954cd6c3551547037c.zip
speed up ipc_resp a bit
+ Skip unwinding stack and just jump directly to userspace
Diffstat (limited to 'src')
-rw-r--r--src/uapi/ipc.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/uapi/ipc.c b/src/uapi/ipc.c
index 0fba899..5f2aad1 100644
--- a/src/uapi/ipc.c
+++ b/src/uapi/ipc.c
@@ -283,13 +283,15 @@ static void leave_rpc(struct tcb *t, struct sys_ret a)
if (t->notify_flags)
notify(t, 0);
- if (is_rpc(t)) {
+ if (is_rpc(t))
use_vmem(t->rpc.vmem);
- return;
- }
+ else
+ use_vmem(t->proc.vmem);
- /* notification didn't take, return back to process normally */
- use_vmem(t->proc.vmem);
+ if (!ctx->notify) {
+ bkl_unlock();
+ ret_userspace_partial();
+ }
}
/**