1 /* Test program for the annotations that suppress write operations. */
3 #include <assert.h> /* assert() */
5 #include <stdio.h> /* EOF */
6 #include <unistd.h> /* getopt() */
7 #include "../../drd/drd.h"
13 static void* thread_func(void* arg)
15 /* Read s_a and modify s_b. */
23 int main(int argc, char** argv)
29 while ((optchar = getopt(argc, argv, "r")) != EOF)
41 pthread_create(&tid, 0, thread_func, 0);
43 ANNOTATE_IGNORE_WRITES_BEGIN();
44 /* Read s_b and modify s_a. */
47 ANNOTATE_IGNORE_WRITES_END();
50 * Insert a delay here in order to make sure the load of s_c happens
51 * after s_c has been modified.
55 /* Read s_c and modify s_a. */
60 fprintf(stderr, "Finished.\n");