X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ftests%2Fthreads%2Fp1-4.c;fp=src%2Ftests%2Fthreads%2Fp1-4.c;h=1f97b2e7edb6fb9ed008a2811d111f638499c9e6;hb=6070611faac84bdf95c4405b3970c6928202f26b;hp=9d66a6f991b695033476542c94279f4bd7412fe9;hpb=39c5d0ad729238d08668ce0eeaa71bc25540bc7b;p=pintos-anon diff --git a/src/tests/threads/p1-4.c b/src/tests/threads/p1-4.c index 9d66a6f..1f97b2e 100644 --- a/src/tests/threads/p1-4.c +++ b/src/tests/threads/p1-4.c @@ -33,7 +33,6 @@ test (void) static thread_func *funcs[] = {io_thread, cpu_thread, io_cpu_thread}; static const char *names[] = {"IO", "CPU", "IO & CPU"}; struct semaphore done[3]; - tid_t tids[3]; int i; printf ("\n" @@ -43,18 +42,12 @@ test (void) for (i = 0; i < 3; i++) { sema_init (&done[i], 0, names[i]); - tids[i] = thread_create (names[i], PRI_DEFAULT, funcs[i], &done[i]); + thread_create (names[i], PRI_DEFAULT, funcs[i], &done[i]); } /* Wait for threads to finish. */ for (i = 0; i < 3; i++) - { -#ifdef THREAD_JOIN_IMPLEMENTED - thread_join (tids[i]); -#else - sema_down (&done[i]); -#endif - } + sema_down (&done[i]); printf ("Multilevel feedback queue scheduler test done.\n"); }