DragonFlyBSD build support.

This commit is contained in:
DC 2020-10-25 15:17:24 +00:00 committed by David Goldblatt
parent bf72188f80
commit ef6d51ed44
4 changed files with 4 additions and 4 deletions

View File

@ -32,7 +32,7 @@
# include <sys/uio.h> # include <sys/uio.h>
# endif # endif
# include <pthread.h> # include <pthread.h>
# ifdef __FreeBSD__ # if defined(__FreeBSD__) || defined(__DragonFly__)
# include <pthread_np.h> # include <pthread_np.h>
# endif # endif
# include <signal.h> # include <signal.h>

View File

@ -506,7 +506,7 @@ background_thread_entry(void *ind_arg) {
assert(thread_ind < max_background_threads); assert(thread_ind < max_background_threads);
#ifdef JEMALLOC_HAVE_PTHREAD_SETNAME_NP #ifdef JEMALLOC_HAVE_PTHREAD_SETNAME_NP
pthread_setname_np(pthread_self(), "jemalloc_bg_thd"); pthread_setname_np(pthread_self(), "jemalloc_bg_thd");
#elif defined(__FreeBSD__) #elif defined(__FreeBSD__) || defined(__DragonFly__)
pthread_set_name_np(pthread_self(), "jemalloc_bg_thd"); pthread_set_name_np(pthread_self(), "jemalloc_bg_thd");
#endif #endif
if (opt_percpu_arena != percpu_arena_disabled) { if (opt_percpu_arena != percpu_arena_disabled) {

View File

@ -815,7 +815,7 @@ malloc_ncpus(void) {
* is available, to avoid using more arenas than necessary. * is available, to avoid using more arenas than necessary.
*/ */
{ {
# if defined(__FreeBSD__) # if defined(__FreeBSD__) || defined(__DragonFly__)
cpuset_t set; cpuset_t set;
# else # else
cpu_set_t set; cpu_set_t set;

View File

@ -436,7 +436,7 @@ prof_dump_open_maps_impl() {
int mfd; int mfd;
cassert(config_prof); cassert(config_prof);
#ifdef __FreeBSD__ #if defined(__FreeBSD__) || defined(__DragonFly__)
mfd = prof_open_maps_internal("/proc/curproc/map"); mfd = prof_open_maps_internal("/proc/curproc/map");
#elif defined(_WIN32) #elif defined(_WIN32)
mfd = -1; // Not implemented mfd = -1; // Not implemented