diff options
Diffstat (limited to 'libcilkrts')
-rw-r--r-- | libcilkrts/ChangeLog | 4 | ||||
-rw-r--r-- | libcilkrts/runtime/os-unix.c | 7 |
2 files changed, 10 insertions, 1 deletions
diff --git a/libcilkrts/ChangeLog b/libcilkrts/ChangeLog index bb3913b10d9..3881c82b8e7 100644 --- a/libcilkrts/ChangeLog +++ b/libcilkrts/ChangeLog @@ -1,3 +1,7 @@ +2014-05-21 John Marino <gnugcc@marino.st> + + * runtime/os-unix.c (__DragonFly__): New target. + 2014-04-11 Barry Tannenbaum <barry.m.tannenbaum@intel.com> PR other/60644 diff --git a/libcilkrts/runtime/os-unix.c b/libcilkrts/runtime/os-unix.c index c9ddbbc5961..cb582dd7591 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 |