diff options
Diffstat (limited to 'libcilkrts/runtime/os-unix.c')
-rw-r--r-- | libcilkrts/runtime/os-unix.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libcilkrts/runtime/os-unix.c b/libcilkrts/runtime/os-unix.c index c9ddbbc..cb582dd 100644 --- a/libcilkrts/runtime/os-unix.c +++ b/libcilkrts/runtime/os-unix.c @@ -54,6 +54,8 @@ #elif defined __APPLE__ # include <sys/sysctl.h> // Uses sysconf(_SC_NPROCESSORS_ONLN) in verbose output +#elif defined __DragonFly__ +// No additional include files #elif defined __FreeBSD__ // No additional include files #elif defined __CYGWIN__ @@ -374,7 +376,7 @@ COMMON_SYSDEP int __cilkrts_hardware_cpu_count(void) assert((unsigned)count == count); return count; -#elif defined __FreeBSD__ || defined __CYGWIN__ +#elif defined __FreeBSD__ || defined __CYGWIN__ || defined __DragonFly__ int ncores = sysconf(_SC_NPROCESSORS_ONLN); return ncores; @@ -402,6 +404,9 @@ COMMON_SYSDEP void __cilkrts_yield(void) // On MacOS, call sched_yield to yield quantum. I'm not sure why we // don't do this on Linux also. sched_yield(); +#elif defined(__DragonFly__) + // On DragonFly BSD, call sched_yield to yield quantum. + sched_yield(); #elif defined(__MIC__) // On MIC, pthread_yield() really trashes things. Arch's measurements // showed that calling _mm_delay_32() (or doing nothing) was a better |