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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Sat Dec 21 17:37:24 2013 +0100

cobalt/sched: tp: include CPU number in timer name (SMP)

---

 kernel/cobalt/sched-tp.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/kernel/cobalt/sched-tp.c b/kernel/cobalt/sched-tp.c
index bf30c7a..ce834df 100644
--- a/kernel/cobalt/sched-tp.c
+++ b/kernel/cobalt/sched-tp.c
@@ -85,6 +85,7 @@ static void tp_tick_handler(struct xntimer *timer)
 static void xnsched_tp_init(struct xnsched *sched)
 {
        struct xnsched_tp *tp = &sched->tp;
+       char timer_name[XNOBJECT_NAME_LEN];
        int n;
 
        /*
@@ -98,12 +99,17 @@ static void xnsched_tp_init(struct xnsched *sched)
        xnsched_initq(&tp->idle.runnable,
                      XNSCHED_RT_MIN_PRIO, XNSCHED_RT_MAX_PRIO);
 
+#ifdef CONFIG_SMP
+       sprintf(timer_name, "[tp-tick/%u]", sched->cpu);
+#else
+       strcpy(timer_name, "[tp-tick]");
+#endif
        tp->tps = NULL;
        tp->gps = NULL;
        INIT_LIST_HEAD(&tp->threads);
        xntimer_init_noblock(&tp->tf_timer, &nkclock, tp_tick_handler, NULL);
        xntimer_set_sched(&tp->tf_timer, sched);
-       xntimer_set_name(&tp->tf_timer, "tp-tick");
+       xntimer_set_name(&tp->tf_timer, timer_name);
 }
 
 static void xnsched_tp_setparam(struct xnthread *thread,


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

Reply via email to