From e38ce698c0e53473a4540e940b25b6093da84cb7 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Thu, 18 Jul 2024 17:50:39 +0300 Subject: mark some ipc functions inline + Seems to improve code quality a little bit --- src/uapi/ipc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/uapi/ipc.c') diff --git a/src/uapi/ipc.c b/src/uapi/ipc.c index c24f8cf..71dae83 100644 --- a/src/uapi/ipc.c +++ b/src/uapi/ipc.c @@ -62,7 +62,7 @@ enum ipc_flags { * @param r Process to migrate to. * @param s RPC stack regions to mark inaccessible. */ -static void finalize_rpc(struct tcb *t, struct tcb *r, vm_t s) +static inline void finalize_rpc(struct tcb *t, struct tcb *r, vm_t s) { clone_uvmem(r->proc.vmem, t->rpc.vmem); set_return(t, r->callback); @@ -84,7 +84,7 @@ static void finalize_rpc(struct tcb *t, struct tcb *r, vm_t s) * @param flags Kind of IPC we're doing. * @return RPC stack difference that should be passed to finalize_rpc(). */ -static vm_t enter_rpc(struct tcb *t, struct sys_ret a, +static inline vm_t enter_rpc(struct tcb *t, struct sys_ret a, enum ipc_flags flags) { /* reuse current rpc stack location if we're being kicked */ @@ -131,7 +131,7 @@ static vm_t enter_rpc(struct tcb *t, struct sys_ret a, * @return \c true if there's enough stack left to safely do migration, * \c false otherwise. */ -static bool __enough_rpc_stack(struct tcb *t) +static inline bool __enough_rpc_stack(struct tcb *t) { /* get top of call stack */ vm_t top = rpc_position(t); @@ -410,7 +410,6 @@ SYSCALL_DEFINE5(ipc_kick)(struct tcb *t, sys_arg_t pid, sys_arg_t d0, sys_arg_t d1, sys_arg_t d2, sys_arg_t d3) { - enable_irqs(); do_ipc(t, pid, d0, d1, d2, d3, IPC_FORWARD | IPC_TAIL); } -- cgit v1.3