7 #include <condition_variable>
10 cdsc::condition_variable *v;
13 static void *a(void *obj)
16 while(load_32(&shareddata)==0)
22 static void *b(void *obj)
25 store_32(&shareddata, (unsigned int) 1);
31 int user_main(int argc, char **argv)
34 store_32(&shareddata, (unsigned int) 0);
36 v=new cdsc::condition_variable();
38 pthread_create(&t1,NULL, &a, NULL);
39 pthread_create(&t2,NULL, &b, NULL);
41 pthread_join(t1,NULL);
42 pthread_join(t2,NULL);