util/u_thread: don't restrict u_thread_get_time_nano() to __linux__
pthread_getcpuclockid() and clock_gettime() are also available on at least OpenBSD, FreeBSD, NetBSD, DragonFly, Cygwin. Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
c91997b6c4
commit
4913215d14
|
@ -149,7 +149,7 @@ util_get_L3_for_pinned_thread(thrd_t thread, unsigned cores_per_L3)
|
||||||
static inline int64_t
|
static inline int64_t
|
||||||
u_thread_get_time_nano(thrd_t thread)
|
u_thread_get_time_nano(thrd_t thread)
|
||||||
{
|
{
|
||||||
#if defined(__linux__) && defined(HAVE_PTHREAD)
|
#if defined(HAVE_PTHREAD)
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
clockid_t cid;
|
clockid_t cid;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue