8 spinning_barrier *barr;
11 void threadA(void *arg)
17 void threadB(void *arg)
20 printf("var = %d\n", load_32(&var));
24 int user_main(int argc, char **argv)
26 thrd_t A, B[NUMREADERS];
29 barr = new spinning_barrier(NUMREADERS + 1);
31 thrd_create(&A, &threadA, NULL);
32 for (i = 0; i < NUMREADERS; i++)
33 thrd_create(&B[i], &threadB, NULL);
35 for (i = 0; i < NUMREADERS; i++)