Add DRD suppression patterns for races triggered by std::ostream
[valgrind.git] / drd / tests / pth_create_glibc_2_0.c
bloba8dcc8a7ea1d47c04a5ea69cb0af326d37ab1157
1 /*
2 * Test program that invokes pthread_create@GLIBC_2.0().
4 * Note: pthread_create@GLIBC_2.0() is only available in 32-bit glibc versions,
5 * not in 64-bit versions.
6 */
9 #include <pthread.h>
10 #include <stdio.h>
13 extern int pthread_create_glibc_2_0(pthread_t*, const pthread_attr_t*,
14 void *(*)(void*), void*);
16 __asm__(".symver pthread_create_glibc_2_0, pthread_create@GLIBC_2.0");
19 static void* thread_func(void *arg)
21 fprintf(stderr, "The thread.\n");
22 return 0;
25 int main(int argc, char** argv)
27 int result;
28 pthread_t thr;
30 result = (*pthread_create_glibc_2_0)(&thr, 0, thread_func, 0);
31 if (result != 0)
33 fprintf(stderr, "pthread_create() failed.\n");
34 return 1;
36 pthread_join(thr, 0);
37 fprintf(stderr, "Finished.\n");
38 return 0;