From 74f95c5696335b02d768815fea2940bf089d057f Mon Sep 17 00:00:00 2001 From: Christian Cunningham Date: Fri, 18 Mar 2022 13:21:06 -0700 Subject: Fixed Mutex Locking bug --- src/sys/schedule.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/sys') diff --git a/src/sys/schedule.c b/src/sys/schedule.c index 748f7ed..4f8feff 100644 --- a/src/sys/schedule.c +++ b/src/sys/schedule.c @@ -454,8 +454,8 @@ void sched_mutex_resurrect(void* m) // Restore the original priority level if (op != 0xFF) { struct Entry* tentry = pop_thread_from_queue(THREAD_READY, p); - ((struct Thread*)entry->value)->priority = op; - ((struct Thread*)entry->value)->old_priority = 0xFF; + ((struct Thread*)tentry->value)->priority = op; + ((struct Thread*)tentry->value)->old_priority = 0xFF; prepend_thread_to_queue(tentry->value, THREAD_READY, op); } } -- cgit v1.2.1