[Xenomai-git] Philippe Gerum : cobalt/clock: procfs: output tick count as hex value too
Module: xenomai-3 Branch: master Commit: 644821af26d46ecf9bbab662d8daa735802d6428 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=644821af26d46ecf9bbab662d8daa735802d6428 Author: Philippe Gerum Date: Tue Nov 15 13:15:39 2016 +0100 cobalt/clock: procfs: output tick count as hex value too --- kernel/cobalt/clock.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/cobalt/clock.c b/kernel/cobalt/clock.c index 647eca3..a4d0df8 100644 --- a/kernel/cobalt/clock.c +++ b/kernel/cobalt/clock.c @@ -508,6 +508,7 @@ void print_core_clock_status(struct xnclock *clock, static int clock_show(struct xnvfile_regular_iterator *it, void *data) { struct xnclock *clock = xnvfile_priv(it->vfile); + xnticks_t now = xnclock_read_raw(clock); if (clock->id >= 0) /* External clock, print id. */ xnvfile_printf(it, "%7s: %d\n", "id", __COBALT_CLOCK_EXT(clock->id)); @@ -519,7 +520,8 @@ static int clock_show(struct xnvfile_regular_iterator *it, void *data) xnclock_print_status(clock, it); - xnvfile_printf(it, "%7s: %Lu\n", "ticks", xnclock_read_raw(clock)); + xnvfile_printf(it, "%7s: %Lu (%.4Lx %.4x)\n", "ticks", + now, now >> 32, (u32)(now & -1U)); return 0; } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Philippe Gerum : cobalt/clock: procfs: output tick count as hex value too
Module: xenomai-3 Branch: wip/drivers Commit: 644821af26d46ecf9bbab662d8daa735802d6428 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=644821af26d46ecf9bbab662d8daa735802d6428 Author: Philippe Gerum Date: Tue Nov 15 13:15:39 2016 +0100 cobalt/clock: procfs: output tick count as hex value too --- kernel/cobalt/clock.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/cobalt/clock.c b/kernel/cobalt/clock.c index 647eca3..a4d0df8 100644 --- a/kernel/cobalt/clock.c +++ b/kernel/cobalt/clock.c @@ -508,6 +508,7 @@ void print_core_clock_status(struct xnclock *clock, static int clock_show(struct xnvfile_regular_iterator *it, void *data) { struct xnclock *clock = xnvfile_priv(it->vfile); + xnticks_t now = xnclock_read_raw(clock); if (clock->id >= 0) /* External clock, print id. */ xnvfile_printf(it, "%7s: %d\n", "id", __COBALT_CLOCK_EXT(clock->id)); @@ -519,7 +520,8 @@ static int clock_show(struct xnvfile_regular_iterator *it, void *data) xnclock_print_status(clock, it); - xnvfile_printf(it, "%7s: %Lu\n", "ticks", xnclock_read_raw(clock)); + xnvfile_printf(it, "%7s: %Lu (%.4Lx %.4x)\n", "ticks", + now, now >> 32, (u32)(now & -1U)); return 0; } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Philippe Gerum : cobalt/clock: procfs: output tick count as hex value too
Module: xenomai-3 Branch: next Commit: 644821af26d46ecf9bbab662d8daa735802d6428 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=644821af26d46ecf9bbab662d8daa735802d6428 Author: Philippe Gerum Date: Tue Nov 15 13:15:39 2016 +0100 cobalt/clock: procfs: output tick count as hex value too --- kernel/cobalt/clock.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/cobalt/clock.c b/kernel/cobalt/clock.c index 647eca3..a4d0df8 100644 --- a/kernel/cobalt/clock.c +++ b/kernel/cobalt/clock.c @@ -508,6 +508,7 @@ void print_core_clock_status(struct xnclock *clock, static int clock_show(struct xnvfile_regular_iterator *it, void *data) { struct xnclock *clock = xnvfile_priv(it->vfile); + xnticks_t now = xnclock_read_raw(clock); if (clock->id >= 0) /* External clock, print id. */ xnvfile_printf(it, "%7s: %d\n", "id", __COBALT_CLOCK_EXT(clock->id)); @@ -519,7 +520,8 @@ static int clock_show(struct xnvfile_regular_iterator *it, void *data) xnclock_print_status(clock, it); - xnvfile_printf(it, "%7s: %Lu\n", "ticks", xnclock_read_raw(clock)); + xnvfile_printf(it, "%7s: %Lu (%.4Lx %.4x)\n", "ticks", + now, now >> 32, (u32)(now & -1U)); return 0; } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Philippe Gerum : cobalt/clock: procfs: output tick count as hex value too
Module: xenomai-3 Branch: stable-3.0.x Commit: 644821af26d46ecf9bbab662d8daa735802d6428 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=644821af26d46ecf9bbab662d8daa735802d6428 Author: Philippe Gerum Date: Tue Nov 15 13:15:39 2016 +0100 cobalt/clock: procfs: output tick count as hex value too --- kernel/cobalt/clock.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/cobalt/clock.c b/kernel/cobalt/clock.c index 647eca3..a4d0df8 100644 --- a/kernel/cobalt/clock.c +++ b/kernel/cobalt/clock.c @@ -508,6 +508,7 @@ void print_core_clock_status(struct xnclock *clock, static int clock_show(struct xnvfile_regular_iterator *it, void *data) { struct xnclock *clock = xnvfile_priv(it->vfile); + xnticks_t now = xnclock_read_raw(clock); if (clock->id >= 0) /* External clock, print id. */ xnvfile_printf(it, "%7s: %d\n", "id", __COBALT_CLOCK_EXT(clock->id)); @@ -519,7 +520,8 @@ static int clock_show(struct xnvfile_regular_iterator *it, void *data) xnclock_print_status(clock, it); - xnvfile_printf(it, "%7s: %Lu\n", "ticks", xnclock_read_raw(clock)); + xnvfile_printf(it, "%7s: %Lu (%.4Lx %.4x)\n", "ticks", + now, now >> 32, (u32)(now & -1U)); return 0; } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git