summaryrefslogtreecommitdiff
path: root/libcilkrts
diff options
context:
space:
mode:
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2014-05-21 11:08:58 +0000
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2014-05-21 11:08:58 +0000
commit463553dbd6573d1fd41d24aa1aac8e83bc95e3d6 (patch)
tree03facded16790b6c727201147904c9c4862b73cc /libcilkrts
parentc51f754b281732cea699c7cc2595a0d0c8cc6300 (diff)
downloadgcc-463553dbd6573d1fd41d24aa1aac8e83bc95e3d6.tar.gz
2014-05-21 John Marino <gnugcc@marino.st>
gcc: * config.gcc (*-*-dragonfly*): New target. * configure.ac: Detect dl_iterate_phdr (*freebsd*, *dragonfly*). * configure: Regenerate. * config/dragonfly-stdint.h: New. * config/dragonfly.h: New. * config/dragonfly.opt: New. * config/i386/dragonfly.h: New. * ginclude/stddef.h: Detect _PTRDIFF_T_DECLARED for DragonFly. include: * liberty.h: Use basename function on DragonFly. libcilkrts: * runtime/os-unix.c (__DragonFly__): New target. libgcc: * config.host (*-*-dragonfly*): New target. * crtstuff.c: Make dl_iterate_support generic on *bsd. * enable-execute-stack-mprotect.c: Always mprotect on FreeBSD. * unwind-dw2-fde-dip.c: Add dl_iterate_phr support for DragonFly. * config/i386/dragonfly-unwind.h: New. libitm: * configure.tgt (*-*-dragonfly*): New target. libstdc++-v3: * acinclude.m4 (*-*-dragonfly*): New target. * configure: Regenerate. * configure.host (*-*-dragonfly*): New target. * config/locale/dragonfly/c_locale.cc: New. * config/locale/dragonfly/ctype_members.cc: New. * config/os/bsd/dragonfly/ctype_base.h: New. * config/os/bsd/dragonfly/ctype_configure_char.cc: New. * config/os/bsd/dragonfly/ctype_inline.h: New. * config/os/bsd/dragonfly/os_defines.h: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210694 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcilkrts')
-rw-r--r--libcilkrts/ChangeLog4
-rw-r--r--libcilkrts/runtime/os-unix.c7
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