clean up code
[c11tester.git] / test / userprog.c
index 02a83b4b2f2469f6af1f59c77038ed95c7878998..415eb24805b3e758deea6d65a378962a48d14cce 100644 (file)
@@ -6,11 +6,13 @@
 
 atomic_int x;
 atomic_int y;
+int z;
 
 static void a(void *obj)
 {
        int r1=atomic_load_explicit(&y, memory_order_relaxed);
        atomic_store_explicit(&x, r1, memory_order_relaxed);
+//     z = 1;
        printf("r1=%d\n",r1);
 }
 
@@ -18,6 +20,7 @@ static void b(void *obj)
 {
        int r2=atomic_load_explicit(&x, memory_order_relaxed);
        atomic_store_explicit(&y, 42, memory_order_relaxed);
+//     z = 2;
        printf("r2=%d\n",r2);
 }
 
@@ -25,7 +28,7 @@ int user_main(int argc, char **argv)
 {
        thrd_t t1, t2;
 
-       atomic_init(&x, 0);
+       atomic_init(&x, 30);
        atomic_init(&y, 0);
 
        printf("Main thread: creating 2 threads\n");