[RISCV] Add RVVConstraint to SiFive custom matrix multiply instructions. (#124055)
[llvm-project.git] / compiler-rt / test / sanitizer_common / TestCases / Posix / create_thread_loop.cpp
blob11c982835191d5145bdc6caf7827e8b2eca08b6e
1 // Simple stress test for of pthread_create. Increase arg to use as benchmark.
3 // RUN: %clangxx -O3 -pthread %s -o %t && %run %t 1000
5 // Inconsistently fails on Android and can timeout on darwin platforms.
6 // UNSUPPORTED: android, darwin
8 #include <pthread.h>
9 #include <stdlib.h>
11 extern "C" const char *__asan_default_options() {
12 // 32bit asan can allocate just a few FakeStacks.
13 return sizeof(void *) < 8 ? "detect_stack_use_after_return=0" : "";
16 static void *null_func(void *args) { return nullptr; }
18 int main(int argc, char **argv) {
19 int n = atoi(argv[1]);
20 for (int i = 0; i < n; ++i) {
21 pthread_t thread;
22 if (pthread_create(&thread, 0, null_func, NULL) == 0)
23 pthread_detach(thread);
25 return 0;