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:
Jonathan Gray 2019-12-01 02:17:36 +11:00 committed by Marek Olšák
parent c91997b6c4
commit 4913215d14
1 changed files with 1 additions and 1 deletions

View File

@ -149,7 +149,7 @@ util_get_L3_for_pinned_thread(thrd_t thread, unsigned cores_per_L3)
static inline int64_t
u_thread_get_time_nano(thrd_t thread)
{
#if defined(__linux__) && defined(HAVE_PTHREAD)
#if defined(HAVE_PTHREAD)
struct timespec ts;
clockid_t cid;