Add DRD suppression patterns for races triggered by std::ostream
[valgrind.git] / drd / tests / pth_detached3.c
blobc02eef11abf3178455cda4cc4ea2f2075eab016b
1 /* Invoke pthread_detach() with an invalid thread ID. */
3 #include <assert.h>
4 #include <errno.h>
5 #include <pthread.h>
6 #include <stdio.h>
8 static void* thread_func(void* arg)
10 return 0;
13 int main(int argc, char** argv)
15 pthread_t thread;
17 pthread_create(&thread, NULL, thread_func, NULL);
18 pthread_join(thread, NULL);
20 /* Invoke pthread_detach() with the thread ID of a joined thread. */
21 pthread_detach(thread);
23 /* Invoke pthread_detach() with an invalid thread ID. */
24 pthread_detach(thread + 8);
26 fprintf(stderr, "Finished.\n");
28 return 0;