Module: xenomai-forge Branch: next Commit: 9d7f1383ef1428e506a935155a77bb684aa4f090 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=9d7f1383ef1428e506a935155a77bb684aa4f090
Author: Philippe Gerum <r...@xenomai.org> Date: Mon Mar 10 12:58:56 2014 +0100 cobalt/shadow: drop useless muxid arg from sys_info request --- include/cobalt/uapi/asm-generic/syscall.h | 4 ++-- kernel/cobalt/shadow.c | 6 +----- lib/cobalt/init.c | 2 +- lib/cobalt/sem_heap.c | 2 +- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/include/cobalt/uapi/asm-generic/syscall.h b/include/cobalt/uapi/asm-generic/syscall.h index 8d5a3f3..3becdb1 100644 --- a/include/cobalt/uapi/asm-generic/syscall.h +++ b/include/cobalt/uapi/asm-generic/syscall.h @@ -24,9 +24,9 @@ /* Xenomai multiplexer syscall. */ #define sc_nucleus_mux 555 /* Must fit within 15bit */ /* Xenomai nucleus syscalls. */ -#define sc_nucleus_bind 0 /* muxid = bind_to_interface(magic, &breq) */ +#define sc_nucleus_bind 0 /* muxid = xnshadow_sys_bind(magic, &breq) */ #define sc_nucleus_migrate 1 /* switched = xnshadow_relax/harden() */ -#define sc_nucleus_info 2 /* xnshadow_get_info(muxid,&info) */ +#define sc_nucleus_info 2 /* xnshadow_sys_info(&info) */ #define sc_nucleus_arch 3 /* r = xnarch_local_syscall(args) */ #define sc_nucleus_trace 4 /* r = xntrace_xxx(...) */ #define sc_nucleus_heap_info 5 diff --git a/kernel/cobalt/shadow.c b/kernel/cobalt/shadow.c index 9ace53d..1669bcf 100644 --- a/kernel/cobalt/shadow.c +++ b/kernel/cobalt/shadow.c @@ -1396,14 +1396,10 @@ fail_destroy_process: return ret; } -static int xnshadow_sys_info(int muxid, struct xnsysinfo __user *u_info) +static int xnshadow_sys_info(struct xnsysinfo __user *u_info) { struct xnsysinfo info; - if (muxid < 0 || muxid > NR_PERSONALITIES || - personalities[muxid] == NULL) - return -EINVAL; - info.clockfreq = xnarch_machdata.clock_freq; info.vdso = xnheap_mapped_offset(&xnsys_ppd_get(1)->sem_heap, nkvdso); diff --git a/lib/cobalt/init.c b/lib/cobalt/init.c index 7e35f19..4592c21 100644 --- a/lib/cobalt/init.c +++ b/lib/cobalt/init.c @@ -112,7 +112,7 @@ static int bind_interface(void) cobalt_check_features(f); - ret = XENOMAI_SYSCALL2(sc_nucleus_info, muxid, &sysinfo); + ret = XENOMAI_SYSCALL1(sc_nucleus_info, &sysinfo); if (ret) { report_error("sysinfo failed: %s", strerror(-ret)); exit(EXIT_FAILURE); diff --git a/lib/cobalt/sem_heap.c b/lib/cobalt/sem_heap.c index 631f75a..b611fde 100644 --- a/lib/cobalt/sem_heap.c +++ b/lib/cobalt/sem_heap.c @@ -112,7 +112,7 @@ static void cobalt_init_vdso(void) struct xnsysinfo sysinfo; int err; - err = XENOMAI_SYSCALL2(sc_nucleus_info, 0, &sysinfo); + err = XENOMAI_SYSCALL1(sc_nucleus_info, &sysinfo); if (err < 0) { errno = -err; perror("Xenomai: sys_info failed"); _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git