summaryrefslogtreecommitdiffstats
path: root/src/thread.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2014-01-29 19:30:27 +0000
committerdim <dim@FreeBSD.org>2014-01-29 19:30:27 +0000
commitc3e10da3dc0f616b78ccf85206fdcf4c92f8ac85 (patch)
tree5812a629bd48b0968dee7411809c6a6a19680390 /src/thread.cpp
parent30a0ccc9e6a2233c7d9f03028880be3e205fd7d1 (diff)
downloadFreeBSD-src-c3e10da3dc0f616b78ccf85206fdcf4c92f8ac85.zip
FreeBSD-src-c3e10da3dc0f616b78ccf85206fdcf4c92f8ac85.tar.gz
Vendor import of libc++ tags/RELEASE_34/final r197960:
https://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_34/final@197960
Diffstat (limited to 'src/thread.cpp')
-rw-r--r--src/thread.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/thread.cpp b/src/thread.cpp
index 1fd8bb0..338a8a2 100644
--- a/src/thread.cpp
+++ b/src/thread.cpp
@@ -14,9 +14,9 @@
#include "limits"
#include <sys/types.h>
#if !defined(_WIN32)
-#if !defined(__sun__) && !defined(__linux__)
+#if !defined(__sun__) && !defined(__linux__) && !defined(_AIX)
#include <sys/sysctl.h>
-#endif // !__sun__ && !__linux__
+#endif // !__sun__ && !__linux__ && !_AIX
#include <unistd.h>
#endif // !_WIN32
@@ -89,7 +89,11 @@ thread::hardware_concurrency() _NOEXCEPT
#else // defined(CTL_HW) && defined(HW_NCPU)
// TODO: grovel through /proc or check cpuid on x86 and similar
// instructions on other architectures.
-#warning hardware_concurrency not yet implemented
+# if defined(_MSC_VER) && ! defined(__clang__)
+ _LIBCPP_WARNING("hardware_concurrency not yet implemented")
+# else
+# warning hardware_concurrency not yet implemented
+# endif
return 0; // Means not computable [thread.thread.static]
#endif // defined(CTL_HW) && defined(HW_NCPU)
}
OpenPOWER on IntegriCloud