Module: xenomai-forge
Branch: next
Commit: eda18d7e84e8a97181998b2245de9eef4930210b
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=eda18d7e84e8a97181998b2245de9eef4930210b

Author: Philippe Gerum <r...@xenomai.org>
Date:   Mon Sep  8 21:17:27 2014 +0200

cobalt/syscall: prepare for sysctl

---

 include/cobalt/uapi/syscall.h |    2 +-
 kernel/cobalt/posix/syscall.c |    8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/include/cobalt/uapi/syscall.h b/include/cobalt/uapi/syscall.h
index 0f04592..59d90e5 100644
--- a/include/cobalt/uapi/syscall.h
+++ b/include/cobalt/uapi/syscall.h
@@ -112,7 +112,7 @@
 #define sc_cobalt_archcall                     89
 #define sc_cobalt_info                         90
 #define sc_cobalt_trace                                91
-/* 92 unimp */
+#define sc_cobalt_sysctl                       92
 #define sc_cobalt_get_current                  93
 #define sc_cobalt_mayday                       94
 #define sc_cobalt_backtrace                    95
diff --git a/kernel/cobalt/posix/syscall.c b/kernel/cobalt/posix/syscall.c
index b29a727..48d0fc1 100644
--- a/kernel/cobalt/posix/syscall.c
+++ b/kernel/cobalt/posix/syscall.c
@@ -696,6 +696,12 @@ static COBALT_SYSCALL(sysconf, current,
        return ret ? -EFAULT : 0;
 }
 
+static COBALT_SYSCALL(sysctl, probing,
+                     int, (int option, void __user *u_buf, size_t u_bufsz))
+{
+       return -EINVAL;
+}
+
 static int cobalt_ni(void)
 {
        return -ENOSYS;
@@ -865,6 +871,7 @@ static const cobalt_syshand cobalt_syscalls[] = {
        __COBALT_CALL_ENTRY(backtrace),
        __COBALT_CALL_ENTRY(serialdbg),
        __COBALT_CALL_ENTRY(sysconf),
+       __COBALT_CALL_ENTRY(sysctl),
 #ifdef CONFIG_XENO_OPT_SYS3264
 #include <asm/xenomai/syscall32-table.h>
 #endif 
@@ -968,4 +975,5 @@ static const int cobalt_sysmodes[] = {
        __COBALT_MODE(backtrace, current),
        __COBALT_MODE(serialdbg, current),
        __COBALT_MODE(sysconf, current),
+       __COBALT_MODE(sysctl, probing),
 };


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to