1 /* Test program to verify whether DRD only complains about uninitialized
2 * condition variables for dynamically allocated memory.
10 static pthread_cond_t s_cond1
= PTHREAD_COND_INITIALIZER
;
11 static pthread_cond_t s_cond2
= PTHREAD_COND_INITIALIZER
;
14 int main(int argc
, char** argv
)
16 fprintf(stderr
, "Statically initialized condition variable.\n");
18 pthread_cond_signal(&s_cond1
);
20 fprintf(stderr
, "Uninitialized condition variable.\n");
22 *((char*)&s_cond2
+ sizeof(s_cond2
) - 1) ^= 1;
23 pthread_cond_signal(&s_cond2
);
25 fprintf(stderr
, "Done.\n");