X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fthreads%2Fsynch.c;h=28696d471aecfc67bfffc243f3734b0dd34a09b2;hb=0c0dbb75ede6cd272fd48606612f0e12a815db97;hp=169128d8ba62e84e3d6d738a9237988716023bb4;hpb=f2f8875638593bd5365cfd6a5ba7c9578e52322f;p=pintos-anon diff --git a/src/threads/synch.c b/src/threads/synch.c index 169128d..28696d4 100644 --- a/src/threads/synch.c +++ b/src/threads/synch.c @@ -111,14 +111,13 @@ static void sema_test_helper (void *sema_); void sema_self_test (void) { - struct thread *thread; struct semaphore sema[2]; int i; printf ("Testing semaphores..."); sema_init (&sema[0], 0, "ping"); sema_init (&sema[1], 0, "pong"); - thread = thread_create ("sema-test", sema_test_helper, &sema); + thread_create ("sema-test", PRI_DEFAULT, sema_test_helper, &sema); for (i = 0; i < 10; i++) { sema_up (&sema[0]);