[PATCH] Extend support for realtime clock IDs
Tommi Rantala
ext-tommi.1.rantala at nokia.com
Fri Sep 17 06:57:54 UTC 2010
Add support for RT clock IDs found in Linux, POSIX, SUS et al.:
- CLOCK_PROCESS_CPUTIME_ID
- CLOCK_THREAD_CPUTIME_ID
- CLOCK_MONOTONIC_RAW
- CLOCK_REALTIME_COARSE
- CLOCK_MONOTONIC_COARSE
* time.c: array clocknames extended with new clock IDs.
Signed-off-by: Tommi Rantala <ext-tommi.1.rantala at nokia.com>
---
time.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/time.c b/time.c
index 01241d2..898543e 100644
--- a/time.c
+++ b/time.c
@@ -675,6 +675,21 @@ static const struct xlat clocknames[] = {
#ifdef CLOCK_MONOTONIC
{ CLOCK_MONOTONIC, "CLOCK_MONOTONIC" },
#endif
+#ifdef CLOCK_PROCESS_CPUTIME_ID
+ { CLOCK_PROCESS_CPUTIME_ID, "CLOCK_PROCESS_CPUTIME_ID" },
+#endif
+#ifdef CLOCK_THREAD_CPUTIME_ID
+ { CLOCK_THREAD_CPUTIME_ID, "CLOCK_THREAD_CPUTIME_ID" },
+#endif
+#ifdef CLOCK_MONOTONIC_RAW
+ { CLOCK_MONOTONIC_RAW, "CLOCK_MONOTONIC_RAW" },
+#endif
+#ifdef CLOCK_REALTIME_COARSE
+ { CLOCK_REALTIME_COARSE, "CLOCK_REALTIME_COARSE" },
+#endif
+#ifdef CLOCK_MONOTONIC_COARSE
+ { CLOCK_MONOTONIC_COARSE, "CLOCK_MONOTONIC_COARSE" },
+#endif
{ 0, NULL }
};
--
1.7.3.rc0.6.g7505a
More information about the Strace-devel
mailing list