File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -436,6 +436,7 @@ EOF])
436
436
if test x$hwloc_freebsd = xyes; then
437
437
438
438
AC_CHECK_HEADERS ( [ sys/domainset.h] )
439
+ AC_CHECK_HEADERS ( [ sys/thr.h] )
439
440
440
441
fi
441
442
Original file line number Diff line number Diff line change 16
16
#include <pthread.h>
17
17
#include <sys/cdefs.h>
18
18
#include <stddef.h>
19
+ #ifdef HAVE_SYS_THR_H
19
20
#include <sys/thr.h>
21
+ #endif
20
22
#ifdef HAVE_PTHREAD_NP_H
21
23
#include <pthread_np.h>
22
24
#endif
@@ -345,6 +347,7 @@ hwloc_freebsd_get_proc_last_cpu_location(hwloc_topology_t topology __hwloc_attri
345
347
return hwloc_freebsd_get_last_cpu_location (name , set , 0 );
346
348
}
347
349
350
+ #ifdef HAVE_SYS_THR_H
348
351
static int
349
352
hwloc_freebsd_get_thisthread_last_cpu_location (hwloc_topology_t topology __hwloc_attribute_unused , hwloc_cpuset_t set , int flags __hwloc_attribute_unused ) {
350
353
long thr_id ;
@@ -359,6 +362,7 @@ hwloc_freebsd_get_thisthread_last_cpu_location(hwloc_topology_t topology __hwloc
359
362
name [3 ] = getpid ();
360
363
return hwloc_freebsd_get_last_cpu_location (name , set , thr_id );
361
364
}
365
+ #endif
362
366
363
367
static int
364
368
set_locality_info (hwloc_topology_t topology , int ndomains , hwloc_obj_t * nodes ){
@@ -573,7 +577,9 @@ hwloc_set_freebsd_hooks(struct hwloc_binding_hooks *hooks __hwloc_attribute_unus
573
577
#endif
574
578
hooks -> get_thisproc_last_cpu_location = hwloc_freebsd_get_thisproc_last_cpu_location ;
575
579
hooks -> get_proc_last_cpu_location = hwloc_freebsd_get_proc_last_cpu_location ;
580
+ #ifdef HAVE_SYS_THR_H
576
581
hooks -> get_thisthread_last_cpu_location = hwloc_freebsd_get_thisthread_last_cpu_location ;
582
+ #endif
577
583
}
578
584
579
585
static struct hwloc_backend *
Original file line number Diff line number Diff line change 1
1
# Copyright © 2009-2020 Inria. All rights reserved.
2
- # Copyright © 2009, 2011-2012 Université Bordeaux
2
+ # Copyright © 2009, 2011-2012, 2020 Université Bordeaux
3
3
# Copyright © 2009-2014 Cisco Systems, Inc. All rights reserved.
4
4
# See COPYING in top-level directory.
5
5
@@ -90,7 +90,8 @@ libhwloc_port_freebsd_la_CPPFLAGS = $(common_CPPFLAGS) \
90
90
-DHAVE_DECL_PTHREAD_SETAFFINITY_NP=1 \
91
91
-DHAVE_DECL_PTHREAD_GETAFFINITY_NP=1 \
92
92
-DHAVE_CPUSET_SETID \
93
- -DHAVE_SYS_DOMAINSET_H
93
+ -DHAVE_SYS_DOMAINSET_H \
94
+ -DHAVE_SYS_THR_H
94
95
95
96
nodist_libhwloc_port_hpux_la_SOURCES = topology-hpux.c
96
97
libhwloc_port_hpux_la_SOURCES = \
You can’t perform that action at this time.
0 commit comments