blob: 38d57d266da3b2030c5e997cdd4c6e2c0ef62881 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
$NetBSD: patch-libcilkrts_runtime_os-unix.c,v 1.1 2015/07/16 12:03:36 ryoon Exp $
--- libcilkrts/runtime/os-unix.c.orig 2014-05-21 11:08:58.000000000 +0000
+++ libcilkrts/runtime/os-unix.c
@@ -56,7 +56,9 @@
// Uses sysconf(_SC_NPROCESSORS_ONLN) in verbose output
#elif defined __DragonFly__
// No additional include files
-#elif defined __FreeBSD__
+#elif defined __FreeBSD__
+// No additional include files
+#elif defined __NetBSD__
// No additional include files
#elif defined __CYGWIN__
// Cygwin on Windows - no additional include files
@@ -376,7 +378,7 @@ COMMON_SYSDEP int __cilkrts_hardware_cpu
assert((unsigned)count == count);
return count;
-#elif defined __FreeBSD__ || defined __CYGWIN__ || defined __DragonFly__
+#elif defined __FreeBSD__ || defined __CYGWIN__ || defined __DragonFly__ || defined __NetBSD__
int ncores = sysconf(_SC_NPROCESSORS_ONLN);
return ncores;
@@ -400,7 +402,7 @@ COMMON_SYSDEP void __cilkrts_sleep(void)
COMMON_SYSDEP void __cilkrts_yield(void)
{
-#if __APPLE__ || __FreeBSD__ || __VXWORKS__
+#if __APPLE__ || __FreeBSD__ || __NetBSD__ || __VXWORKS__
// On MacOS, call sched_yield to yield quantum. I'm not sure why we
// don't do this on Linux also.
sched_yield();
|