X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Ftests%2Fthreads%2Falarm-wait.c;h=37d3afcea74243abcce4ccde4cb8a3590985c7c6;hb=38e1ff2edf63096a8ce642cc727564074cdc7740;hp=1e584386af3215c7a45fb8f06dfd50ab6df6427d;hpb=615bf3b3d2a8573ed6fb9ddc0055745e163ac999;p=pintos-anon diff --git a/src/tests/threads/alarm-wait.c b/src/tests/threads/alarm-wait.c index 1e58438..37d3afc 100644 --- a/src/tests/threads/alarm-wait.c +++ b/src/tests/threads/alarm-wait.c @@ -1,6 +1,4 @@ -/* Problem 1-1: Alarm Clock tests. - - Creates N threads, each of which sleeps a different, fixed +/* Creates N threads, each of which sleeps a different, fixed duration, M times. Records the wake-up order and verifies that it is valid. */ @@ -59,7 +57,7 @@ test_sleep (int thread_cnt, int iterations) int i; /* This test does not work with the MLFQS. */ - ASSERT (!enable_mlfqs); + ASSERT (!thread_mlfqs); msg ("Creating %d threads to sleep %d times each.", thread_cnt, iterations); msg ("Thread 0 sleeps 10 ticks each time,"); @@ -147,7 +145,6 @@ sleeper (void *t_) { int64_t sleep_until = test->start + i * t->duration; timer_sleep (sleep_until - timer_ticks ()); - lock_acquire (&test->output_lock); *test->output_pos++ = t->id; lock_release (&test->output_lock);