From: Ben Pfaff Date: Sun, 19 Jun 2005 18:53:22 +0000 (+0000) Subject: Unused source file. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pintos-anon;a=commitdiff_plain;h=930ee93dc92cbc20cad96d119c109a9676f413b4 Unused source file. --- diff --git a/src/tests/threads/priority-lower.c b/src/tests/threads/priority-lower.c deleted file mode 100644 index 8843324..0000000 --- a/src/tests/threads/priority-lower.c +++ /dev/null @@ -1,54 +0,0 @@ -#include -#include "tests/threads/tests.h" -#include "threads/init.h" -#include "threads/synch.h" -#include "threads/thread.h" - -static thread_func acquire1_thread_func; -static thread_func acquire2_thread_func; - -void -test_priority_donate_one (void) -{ - struct lock lock; - - /* This test does not work with the MLFQS. */ - ASSERT (!enable_mlfqs); - - /* Make sure our priority is the default. */ - ASSERT (thread_get_priority () == PRI_DEFAULT); - - lock_init (&lock); - lock_acquire (&lock); - thread_create ("acquire1", PRI_DEFAULT - 1, acquire1_thread_func, &lock); - msg ("This thread should have priority %d. Actual priority: %d.", - PRI_DEFAULT - 1, thread_get_priority ()); - thread_create ("acquire2", PRI_DEFAULT - 2, acquire2_thread_func, &lock); - msg ("This thread should have priority %d. Actual priority: %d.", - PRI_DEFAULT - 2, thread_get_priority ()); - lock_release (&lock); - msg ("acquire2, acquire1 must already have finished, in that order."); - msg ("This should be the last line before finishing this test."); -} - -static void -acquire1_thread_func (void *lock_) -{ - struct lock *lock = lock_; - - lock_acquire (lock); - msg ("acquire1: got the lock"); - lock_release (lock); - msg ("acquire1: done"); -} - -static void -acquire2_thread_func (void *lock_) -{ - struct lock *lock = lock_; - - lock_acquire (lock); - msg ("acquire2: got the lock"); - lock_release (lock); - msg ("acquire2: done"); -}