llvm.org GIT mirror llvm / 41d35a3
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173355 91177308-0d34-0410-b5e6-96231b3b80d8 NAKAMURA Takumi 7 years ago
1 changed file(s) with 2 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
3131 void *allocate_stack(pthread_attr_t &a, size_t n = 65536) {
3232 void *stack = malloc(n);
3333 pthread_attr_init(&a);
34 #if defined(__linux__)
3435 pthread_attr_setstack(&a, stack, n);
36 #endif
3537 return stack;
3638 }
3739 }