Add Hurd support.
Patch by samuel.thibault@ens-lyon.org
Differential Revision: https://reviews.llvm.org/D54079
llvm-svn: 346310
diff --git a/openmp/runtime/src/z_Linux_util.cpp b/openmp/runtime/src/z_Linux_util.cpp
index 8c59b43..27a1071 100644
--- a/openmp/runtime/src/z_Linux_util.cpp
+++ b/openmp/runtime/src/z_Linux_util.cpp
@@ -444,8 +444,7 @@
determined exactly, FALSE if incremental refinement is necessary. */
static kmp_int32 __kmp_set_stack_info(int gtid, kmp_info_t *th) {
int stack_data;
-#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD
- /* Linux* OS only -- no pthread_getattr_np support on OS X* */
+#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_HURD
pthread_attr_t attr;
int status;
size_t size = 0;
@@ -497,7 +496,7 @@
sigset_t new_set, old_set;
#endif /* KMP_BLOCK_SIGNALS */
void *exit_val;
-#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD
+#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_HURD
void *volatile padding = 0;
#endif
int gtid;
@@ -1765,7 +1764,7 @@
int r = 0;
-#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD
+#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_HURD
r = sysconf(_SC_NPROCESSORS_ONLN);
@@ -1953,9 +1952,9 @@
int found = 0;
int rc;
-#if KMP_OS_LINUX || KMP_OS_FREEBSD
+#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_HURD
- /* On Linux* OS, read the /proc/<pid>/maps pseudo-file to get all the address
+ /* On GNUish OSes, read the /proc/<pid>/maps pseudo-file to get all the address
ranges mapped into the address space. */
char *name = __kmp_str_format("/proc/%d/maps", getpid());