2 * https://bugs.kde.org/show_bug.cgi?id=352130
3 * https://bugs.kde.org/show_bug.cgi?id=450962
4 * This reproducer has no real race conditions but since helgrind doesn't see
5 * or know about the glibc internal locking done for FILE *state, it will report
6 * a race when several threads run printf due to this fact.
14 void* thread3 (void* d
)
19 printf("Thread 3: %d\n", count3
++);
24 void* thread2 (void* d
)
30 printf("Thread 2: %d\n", count2
++);
37 pthread_create (&thread
, NULL
, thread2
, NULL
);
38 pthread_create (&thread
, NULL
, thread3
, NULL
);
44 printf("Thread 1: %d\n", count1
++);
47 pthread_join(thread
,NULL
);