mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-06-03 10:44:16 +03:00
fix build for non linux/BSD platforms.
This commit is contained in:
parent
3de0c24859
commit
4c95c953e2
3 changed files with 15 additions and 3 deletions
|
|
@ -113,9 +113,7 @@ background_thread_info_init(tsdn_t *tsdn, background_thread_info_t *info) {
|
|||
|
||||
static inline bool
|
||||
set_current_thread_affinity(int cpu) {
|
||||
#ifdef __OpenBSD__
|
||||
return false;
|
||||
#else
|
||||
#if defined(JEMALLOC_HAVE_SCHED_SETAFFINITY) || defined(JEMALLOC_HAVE_PTHREAD_SETAFFINITY_NP)
|
||||
#if defined(JEMALLOC_HAVE_SCHED_SETAFFINITY)
|
||||
cpu_set_t cpuset;
|
||||
#else
|
||||
|
|
@ -146,6 +144,8 @@ set_current_thread_affinity(int cpu) {
|
|||
# endif
|
||||
return ret != 0;
|
||||
#endif
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue