From 4f670845ff9ab6c48bcb5f7bf4d4ef6dc3c3064b Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 27 Mar 2012 11:51:08 +0200 Subject: reorganize file structure to match the upstream requirements --- pintos-progos/tests/threads/priority-preempt.c | 41 -------------------------- 1 file changed, 41 deletions(-) delete mode 100644 pintos-progos/tests/threads/priority-preempt.c (limited to 'pintos-progos/tests/threads/priority-preempt.c') diff --git a/pintos-progos/tests/threads/priority-preempt.c b/pintos-progos/tests/threads/priority-preempt.c deleted file mode 100644 index 3c3aacb..0000000 --- a/pintos-progos/tests/threads/priority-preempt.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Ensures that a high-priority thread really preempts. - - Based on a test originally submitted for Stanford's CS 140 in - winter 1999 by by Matt Franklin - , Greg Hutchins - , Yu Ping Hu . - Modified by arens. */ - -#include -#include "tests/threads/tests.h" -#include "threads/init.h" -#include "threads/synch.h" -#include "threads/thread.h" - -static thread_func simple_thread_func; - -void -test_priority_preempt (void) -{ - /* This test does not work with the MLFQS. */ - ASSERT (!thread_mlfqs); - - /* Make sure our priority is the default. */ - ASSERT (thread_get_priority () == PRI_DEFAULT); - - thread_create ("high-priority", PRI_DEFAULT + 1, simple_thread_func, NULL); - msg ("The high-priority thread should have already completed."); -} - -static void -simple_thread_func (void *aux UNUSED) -{ - int i; - - for (i = 0; i < 5; i++) - { - msg ("Thread %s iteration %d", thread_name (), i); - thread_yield (); - } - msg ("Thread %s done!", thread_name ()); -} -- cgit v1.2.3