mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-23 18:24:13 +08:00
util: fix cpuset support on FreeBSD
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
This commit is contained in:
parent
c00ee00031
commit
0233372581
@ -1143,6 +1143,12 @@ if dep_thread.found() and host_machine.system() != 'windows'
|
||||
args : '-D_GNU_SOURCE')
|
||||
pre_args += '-DHAVE_PTHREAD_SETAFFINITY'
|
||||
endif
|
||||
if cc.has_function(
|
||||
'pthread_setaffinity_np',
|
||||
dependencies : dep_thread,
|
||||
prefix : '#include <pthread_np.h>')
|
||||
pre_args += '-DPTHREAD_SETAFFINITY_IN_NP_HEADER'
|
||||
endif
|
||||
endif
|
||||
dep_expat = dependency('expat')
|
||||
# this only exists on linux so either this is linux and it will be found, or
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user