summaryrefslogtreecommitdiffstats
path: root/src/util/u_thread.h
diff options
context:
space:
mode:
authorGreg V <[email protected]>2018-09-16 19:51:51 +0300
committerEric Engestrom <[email protected]>2019-08-08 21:44:33 +0100
commit0233372581db739a6996d454d8ef4075e3a147c7 (patch)
tree162f8755e7696dd397510eca8bec41f02dac7528 /src/util/u_thread.h
parentc00ee00031dd38a3c12d6661eba5f43d8a422e02 (diff)
util: fix cpuset support on FreeBSD
Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/util/u_thread.h')
-rw-r--r--src/util/u_thread.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/util/u_thread.h b/src/util/u_thread.h
index 1648d2f5841..c6b35d0814b 100644
--- a/src/util/u_thread.h
+++ b/src/util/u_thread.h
@@ -35,6 +35,13 @@
#ifdef HAVE_PTHREAD
#include <signal.h>
+#ifdef PTHREAD_SETAFFINITY_IN_NP_HEADER
+#include <pthread_np.h>
+#endif
+#endif
+
+#ifdef __FreeBSD__
+#define cpu_set_t cpuset_t
#endif
static inline thrd_t u_thread_create(int (*routine)(void *), void *param)