Module: xenomai-forge Branch: next Commit: 7574e138a59bd28da06b16299eb2da196cc2fce9 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=7574e138a59bd28da06b16299eb2da196cc2fce9
Author: Philippe Gerum <r...@xenomai.org> Date: Tue Aug 26 15:43:57 2014 +0200 cobalt/posix/syscall: provide fastcall handler This patch introduces the client-side handler for the fast syscall routing feature available with the upcoming pipelines. A fastcall handler (i.e. ipipe_fastcall_hook) is immediately called from the low level trap code, for handling a client syscall issued by a thread which executes from the primary domain, instead of going through the slower pipelined path. - the fastcall handler is invoked for Cobalt syscalls as defined in include/cobalt/uapi/syscalls.h only, otherwise the syscall is passed to ipipe_syscall_hook. - the fastcall handler may migrate the caller to the root domain if required. - no propagation is possible from the fastcall handler to the regular kernel syscall code, i.e.: ipipe_fastcall_hook shall succeed or fail handling the syscall, but may not offload it to the regular kernel by returning KEVENT_PROPAGATE. - if the pipeline does not support fastcall routing, ipipe_syscall_hook is invoked for handling all syscalls as previously. --- kernel/cobalt/posix/syscall.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/kernel/cobalt/posix/syscall.c b/kernel/cobalt/posix/syscall.c index 4e8e0de..747b2be 100644 --- a/kernel/cobalt/posix/syscall.c +++ b/kernel/cobalt/posix/syscall.c @@ -395,6 +395,16 @@ int ipipe_syscall_hook(struct ipipe_domain *ipd, struct pt_regs *regs) return handle_head_syscall(ipd, regs); } +int ipipe_fastcall_hook(struct pt_regs *regs) +{ + int ret; + + ret = handle_head_syscall(&xnsched_realtime_domain, regs); + XENO_BUGON(NUCLEUS, ret == KEVENT_PROPAGATE); + + return ret; +} + static int cobalt_migrate(int domain) { struct xnthread *thread = xnthread_current(); _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git