3 #include "libthreads.h"
6 static void a(atomic_int *obj)
10 for (i = 0; i < 10; i++) {
11 printf("Thread %d, loop %d\n", thread_current()->index, i);
22 printf("%s() creating 2 threads\n", __func__);
23 thread_create(&t1, &a, &obj);
24 thread_create(&t2, &a, &obj);
28 printf("%s() is finished\n", __func__);