Thanks to Grant Patterson <grantp@stanford.edu>
for reporting the problem.
#include "threads/test.h"
#include <stdio.h>
#include "threads/test.h"
#include <stdio.h>
+#include "threads/synch.h"
#include "threads/thread.h"
static void test_preempt (void);
#include "threads/thread.h"
static void test_preempt (void);
thread_create ("acquire2", PRI_DEFAULT + 2, acquire_thread_func, &lock);
printf ("This thread should have priority %d. Actual priority: %d.\n",
PRI_DEFAULT + 2, thread_get_priority ());
thread_create ("acquire2", PRI_DEFAULT + 2, acquire_thread_func, &lock);
printf ("This thread should have priority %d. Actual priority: %d.\n",
PRI_DEFAULT + 2, thread_get_priority ());
printf ("acquire1 and acquire2 must already have finished, in that order.\n"
"This should be the last line before finishing this test.\n"
"Priority donation test done.\n");
printf ("acquire1 and acquire2 must already have finished, in that order.\n"
"This should be the last line before finishing this test.\n"
"Priority donation test done.\n");