Module: xenomai-3
Branch: master
Commit: 796aa62f3a181356e45c7f72de57ddc1121db9a9
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=796aa62f3a181356e45c7f72de57ddc1121db9a9

Author: Philippe Gerum <r...@xenomai.org>
Date:   Fri Jun 19 10:45:41 2015 +0200

cobalt/clock: output external clock id to vfile

---

 kernel/cobalt/clock.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/kernel/cobalt/clock.c b/kernel/cobalt/clock.c
index 35f20f2..8b8d992 100644
--- a/kernel/cobalt/clock.c
+++ b/kernel/cobalt/clock.c
@@ -487,6 +487,9 @@ static int clock_show(struct xnvfile_regular_iterator *it, 
void *data)
 {
        struct xnclock *clock = xnvfile_priv(it->vfile);
 
+       if (clock->id >= 0)     /* External clock, print id. */
+               xnvfile_printf(it, "%7s: %d\n", "id", clock->id);
+               
        xnvfile_printf(it, "%7s: irq=%Ld kernel=%Ld user=%Ld\n", "gravity",
                       xnclock_ticks_to_ns(clock, xnclock_get_gravity(clock, 
irq)),
                       xnclock_ticks_to_ns(clock, xnclock_get_gravity(clock, 
kernel)),


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

Reply via email to