aboutsummaryrefslogtreecommitdiff
path: root/src/sys
diff options
context:
space:
mode:
Diffstat (limited to 'src/sys')
-rw-r--r--src/sys/schedule.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sys/schedule.c b/src/sys/schedule.c
index 75e7d91..c7ed212 100644
--- a/src/sys/schedule.c
+++ b/src/sys/schedule.c
@@ -408,6 +408,8 @@ void sched_mutex_resurrect(void* m)
// Restore the original priority level
if (op != 0xFF) {
struct ThreadEntry* tentry = pop_from_queue(THREAD_READY, p);
- push_to_queue(tentry->thread, THREAD_READY, p);
+ tentry->thread->priority = op;
+ tentry->thread->old_priority = 0xFF;
+ push_to_queue(tentry->thread, THREAD_READY, op);
}
}