1.1 --- a/src/os/bsd/vm/os_bsd.hpp Mon May 05 15:10:43 2014 +0200 1.2 +++ b/src/os/bsd/vm/os_bsd.hpp Fri Apr 25 07:40:33 2014 +0200 1.3 @@ -58,7 +58,13 @@ 1.4 // For signal flags diagnostics 1.5 static int sigflags[MAXSIGNUM]; 1.6 1.7 +#ifdef __APPLE__ 1.8 + // mach_absolute_time 1.9 + static mach_timebase_info_data_t _timebase_info; 1.10 + static volatile uint64_t _max_abstime; 1.11 +#else 1.12 static int (*_clock_gettime)(clockid_t, struct timespec *); 1.13 +#endif 1.14 1.15 static GrowableArray<int>* _cpu_to_node; 1.16 1.17 @@ -135,11 +141,11 @@ 1.18 static void clock_init(void); 1.19 1.20 static inline bool supports_monotonic_clock() { 1.21 +#ifdef __APPLE__ 1.22 + return true; 1.23 +#else 1.24 return _clock_gettime != NULL; 1.25 - } 1.26 - 1.27 - static int clock_gettime(clockid_t clock_id, struct timespec *tp) { 1.28 - return _clock_gettime ? _clock_gettime(clock_id, tp) : -1; 1.29 +#endif 1.30 } 1.31 1.32 // Stack repair handling