[llvm-commits] [llvm] r173355 - /llvm/trunk/unittests/Support/ManagedStatic.cpp
NAKAMURA Takumi
geek4civic at gmail.com
Thu Jan 24 07:29:27 PST 2013
Author: chapuni
Date: Thu Jan 24 09:29:27 2013
New Revision: 173355
URL: http://llvm.org/viewvc/llvm-project?rev=173355&view=rev
Log:
unittests/SupportTests/Initialize.MultipleThreads: Enable pthread_attr_setstack(3) only on Linux.
I got blamed on darwin11;
unittests/Support/ManagedStatic.cpp:35: error: 'pthread_attr_setstack' was not declared in this scope
Modified:
llvm/trunk/unittests/Support/ManagedStatic.cpp
Modified: llvm/trunk/unittests/Support/ManagedStatic.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/ManagedStatic.cpp?rev=173355&r1=173354&r2=173355&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/ManagedStatic.cpp (original)
+++ llvm/trunk/unittests/Support/ManagedStatic.cpp Thu Jan 24 09:29:27 2013
@@ -32,7 +32,9 @@
void *allocate_stack(pthread_attr_t &a, size_t n = 65536) {
void *stack = malloc(n);
pthread_attr_init(&a);
+#if defined(__linux__)
pthread_attr_setstack(&a, stack, n);
+#endif
return stack;
}
}
More information about the llvm-commits
mailing list