projects
/
ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Privatize headers
[ust.git]
/
include
/
ust
/
clock.h
diff --git
a/include/ust/clock.h
b/include/ust/clock.h
index 5e558f8e767a44c21d34e9d90161e504fe7540b3..5e8f755b9c08573d1fd7ec110156fe3ea71bdaf4 100644
(file)
--- a/
include/ust/clock.h
+++ b/
include/ust/clock.h
@@
-20,7
+20,9
@@
#include <time.h>
#include <sys/time.h>
#include <time.h>
#include <sys/time.h>
-#include <ust/kcompat/kcompat.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <ust/core.h>
/* TRACE CLOCK */
/* TRACE CLOCK */
@@
-44,17
+46,17
@@
#define CLOCK_TRACE 15
union lttng_timespec {
struct timespec ts;
#define CLOCK_TRACE 15
union lttng_timespec {
struct timespec ts;
- u
64
lttng_ts;
+ u
int64_t
lttng_ts;
};
extern int ust_clock_source;
/* Choosing correct trace clock */
};
extern int ust_clock_source;
/* Choosing correct trace clock */
-static __inline__ u
64
trace_clock_read64(void)
+static __inline__ u
int64_t
trace_clock_read64(void)
{
struct timespec ts;
{
struct timespec ts;
- u
64
retval;
+ u
int64_t
retval;
union lttng_timespec *lts = (union lttng_timespec *) &ts;
clock_gettime(ust_clock_source, &ts);
union lttng_timespec *lts = (union lttng_timespec *) &ts;
clock_gettime(ust_clock_source, &ts);
@@
-74,22
+76,26
@@
static __inline__ u64 trace_clock_read64(void)
return retval;
}
return retval;
}
-
-static __inline__ u
64
trace_clock_frequency(void)
+#if __i386__ || __x86_64__
+static __inline__ u
int64_t
trace_clock_frequency(void)
{
struct timespec ts;
union lttng_timespec *lts = (union lttng_timespec *) &ts;
{
struct timespec ts;
union lttng_timespec *lts = (union lttng_timespec *) &ts;
-#if __i386__ || __x86_64__
if (likely(ust_clock_source == CLOCK_TRACE)) {
clock_gettime(CLOCK_TRACE_FREQ, &ts);
return lts->lttng_ts;
}
if (likely(ust_clock_source == CLOCK_TRACE)) {
clock_gettime(CLOCK_TRACE_FREQ, &ts);
return lts->lttng_ts;
}
-#endif
return 1000000000LL;
}
return 1000000000LL;
}
+#else /* #if __i386__ || __x86_64__ */
+static __inline__ uint64_t trace_clock_frequency(void)
+{
+ return 1000000000LL;
+}
+#endif /* #else #if __i386__ || __x86_64__ */
-static __inline__ u
32
trace_clock_freq_scale(void)
+static __inline__ u
int32_t
trace_clock_freq_scale(void)
{
return 1;
}
{
return 1;
}
This page took
0.025572 seconds
and
4
git commands to generate.