From: Brian Norris Date: Sat, 10 Mar 2012 01:05:48 +0000 (-0800) Subject: modify "user program" X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8c1043cf9555045f3695af6abe4a78126ba8dcdf;p=c11tester.git modify "user program" --- diff --git a/libthreads.c b/libthreads.c index 959fb772..15c6b949 100644 --- a/libthreads.c +++ b/libthreads.c @@ -110,12 +110,12 @@ void thread_join(struct thread *t) thread_yield(); } -void a(int *idx) +void a(int *parm) { int i; for (i = 0; i < 10; i++) { - printf("Thread %d, loop %d\n", *idx, i); + printf("Thread %d, magic number %d, loop %d\n", current->index, *parm, i); if (i % 2) thread_yield(); } @@ -124,7 +124,7 @@ void a(int *idx) void user_main() { struct thread t1, t2; - int i = 2, j = 3; + int i = 17, j = 13; printf("%s() creating 2 threads\n", __func__); thread_create(&t1, &a, &i);