projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Launch the application notification thread using lttng_thread
[lttng-tools.git]
/
src
/
common
/
compat
/
time.h
diff --git
a/src/common/compat/time.h
b/src/common/compat/time.h
index c8d5859ff9ef22ea8b48c5d3429752342ed89120..49f5039084a79083c63eab538d1486aeeedd594a 100644
(file)
--- a/
src/common/compat/time.h
+++ b/
src/common/compat/time.h
@@
-26,16
+26,23
@@
#include <time.h>
#ifdef __APPLE__
#include <time.h>
#ifdef __APPLE__
+
typedef uint64_t timer_t;
typedef uint64_t timer_t;
-typedef int clockid_t;
#include <mach/mach.h>
#include <mach/clock.h>
#include <mach/mach.h>
#include <mach/clock.h>
+#include <errno.h>
#undef NSEC_PER_SEC
#undef NSEC_PER_MSEC
#undef NSEC_PER_USEC
#undef NSEC_PER_SEC
#undef NSEC_PER_MSEC
#undef NSEC_PER_USEC
+#endif /* __APPLE__ */
+
+/* macOS/OS X 10.12 (Sierra) and up provide clock_gettime() */
+#if defined(__APPLE__) && !defined(LTTNG_HAVE_CLOCK_GETTIME)
+
+typedef int clockid_t;
#define CLOCK_REALTIME CALENDAR_CLOCK
#define CLOCK_MONOTONIC SYSTEM_CLOCK
#define CLOCK_REALTIME CALENDAR_CLOCK
#define CLOCK_MONOTONIC SYSTEM_CLOCK
@@
-69,7
+76,7
@@
end:
return ret;
}
return ret;
}
-#else /* __APPLE__ */
+#else /* __APPLE__
&& !LTTNG_HAVE_CLOCK_GETTIME
*/
static inline
int lttng_clock_gettime(clockid_t clk_id, struct timespec *tp)
static inline
int lttng_clock_gettime(clockid_t clk_id, struct timespec *tp)
@@
-77,6
+84,6
@@
int lttng_clock_gettime(clockid_t clk_id, struct timespec *tp)
return clock_gettime(clk_id, tp);
}
return clock_gettime(clk_id, tp);
}
-#endif /* __APPLE__ */
+#endif /* __APPLE__
&& !LTTNG_HAVE_CLOCK_GETTIME
*/
#endif /* _COMPAT_TIME_H */
#endif /* _COMPAT_TIME_H */
This page took
0.024492 seconds
and
4
git commands to generate.