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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Wed Feb 19 19:18:50 2014 +0100

cobalt/shadow: drop unused sc_nucleus_current_info syscall

---

 include/cobalt/uapi/asm-generic/syscall.h |    7 +++----
 include/cobalt/uapi/kernel/thread.h       |   30 ----------------------------
 kernel/cobalt/shadow.c                    |   31 -----------------------------
 3 files changed, 3 insertions(+), 65 deletions(-)

diff --git a/include/cobalt/uapi/asm-generic/syscall.h 
b/include/cobalt/uapi/asm-generic/syscall.h
index 056fc6c..8d5a3f3 100644
--- a/include/cobalt/uapi/asm-generic/syscall.h
+++ b/include/cobalt/uapi/asm-generic/syscall.h
@@ -31,10 +31,9 @@
 #define sc_nucleus_trace        4      /* r = xntrace_xxx(...) */
 #define sc_nucleus_heap_info    5
 #define sc_nucleus_current      6      /* threadh = xnthread_handle(cur) */
-#define sc_nucleus_current_info  7     /* r = xnshadow_current_info(&info) */
-#define sc_nucleus_mayday        8     /* request mayday fixup */
-#define sc_nucleus_backtrace     9     /* collect backtrace (relax tracing) */
-#define sc_nucleus_serialdbg     10    /* output to serial console 
(__ipipe_serial_debug()) */
+#define sc_nucleus_mayday        7     /* request mayday fixup */
+#define sc_nucleus_backtrace     8     /* collect backtrace (relax tracing) */
+#define sc_nucleus_serialdbg     9     /* output to serial console 
(__ipipe_serial_debug()) */
 
 struct xnbindreq {
        int feat_req;           /* Features userland requires. */
diff --git a/include/cobalt/uapi/kernel/thread.h 
b/include/cobalt/uapi/kernel/thread.h
index a5f6e24..8b7944f 100644
--- a/include/cobalt/uapi/kernel/thread.h
+++ b/include/cobalt/uapi/kernel/thread.h
@@ -94,36 +94,6 @@
  */
 #define XNTHREAD_STATE_LABELS  "SWDRU..X.HbTlrt.....L"
 
-/**
- * @brief Structure containing thread information.
- */
-struct xnthread_info {
-       /**< Thread state, @see nucleus_state_flags */
-       unsigned long state;
-       /**< Base priority. */
-       int bprio;
-       /**< Current priority. May be subject to PI boost.*/
-       int cprio;
-       /**< CPU the thread currently runs on. */
-       int cpu;
-       /**< CPU affinity. */
-       unsigned long affinity;
-       /**< Time of next release.*/
-       unsigned long long relpoint;
-       /**< Execution time in primary mode (ns). */
-       unsigned long long exectime;
-       /**< Number of relaxes (i.e. secondary mode switches). */
-       unsigned long modeswitches;
-       /**< Number of context switches. */
-       unsigned long ctxswitches;
-       /**< Number of page faults. */
-       unsigned long pagefaults;
-       /**< Number of Xenomai syscalls. */
-       unsigned long syscalls;
-       /**< Symbolic name. */
-       char name[XNOBJECT_NAME_LEN];
-};
-
 struct xnthread_user_window {
        unsigned long state;
        unsigned long grant_value;
diff --git a/kernel/cobalt/shadow.c b/kernel/cobalt/shadow.c
index 8c18ed2..edc4a88 100644
--- a/kernel/cobalt/shadow.c
+++ b/kernel/cobalt/shadow.c
@@ -1515,36 +1515,6 @@ static int xnshadow_sys_current(xnhandle_t __user 
*u_handle)
                                      sizeof(*u_handle));
 }
 
-static int xnshadow_sys_current_info(struct xnthread_info __user *u_info)
-{
-       struct xnthread *cur = xnshadow_current();
-       struct xnthread_info info;
-       xnticks_t raw_exectime;
-       int i;
-
-       if (cur == NULL)
-               return -EPERM;
-
-       info.state = xnthread_state_flags(cur);
-       info.bprio = xnthread_base_priority(cur);
-       info.cprio = xnthread_current_priority(cur);
-       info.cpu = xnsched_cpu(xnthread_sched(cur));
-       for (i = 0, info.affinity = 0; i < BITS_PER_LONG; i++)
-               if (xnthread_affine_p(cur, i))
-                       info.affinity |= 1UL << i;
-       info.relpoint = xntimer_get_date(&cur->ptimer);
-       raw_exectime = xnthread_get_exectime(cur) +
-               xnstat_exectime_now() - xnthread_get_lastswitch(cur);
-       info.exectime = xnclock_ticks_to_ns(&nkclock, raw_exectime);
-       info.modeswitches = xnstat_counter_get(&cur->stat.ssw);
-       info.ctxswitches = xnstat_counter_get(&cur->stat.csw);
-       info.pagefaults = xnstat_counter_get(&cur->stat.pf);
-       info.syscalls = xnstat_counter_get(&cur->stat.xsc);
-       strcpy(info.name, xnthread_name(cur));
-
-       return __xn_safe_copy_to_user(u_info, &info, sizeof(*u_info));
-}
-
 static int xnshadow_sys_backtrace(int nr, unsigned long __user *u_backtrace,
                                  int reason)
 {
@@ -1697,7 +1667,6 @@ static struct xnsyscall user_syscalls[] = {
        SKINCALL_DEF(sc_nucleus_trace, xnshadow_sys_trace, any),
        SKINCALL_DEF(sc_nucleus_heap_info, xnshadow_sys_heap_info, lostage),
        SKINCALL_DEF(sc_nucleus_current, xnshadow_sys_current, any),
-       SKINCALL_DEF(sc_nucleus_current_info, xnshadow_sys_current_info, 
shadow),
        SKINCALL_DEF(sc_nucleus_mayday, xnshadow_sys_mayday, oneway),
        SKINCALL_DEF(sc_nucleus_backtrace, xnshadow_sys_backtrace, current),
        SKINCALL_DEF(sc_nucleus_serialdbg, xnshadow_sys_serialdbg, any),


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

Reply via email to