From 54b46806babf9412e8c5b22d9fb28cd7ccc868ca Mon Sep 17 00:00:00 2001 From: Themis Demetriades Date: Tue, 15 Oct 2024 15:12:01 +0100 Subject: [PATCH] Update thread creation to yield thread in case it's no longer the highest priority --- src/threads/thread.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/threads/thread.c b/src/threads/thread.c index 709fcef..6b48788 100644 --- a/src/threads/thread.c +++ b/src/threads/thread.c @@ -219,6 +219,7 @@ thread_create (const char *name, int priority, /* Add to run queue. */ thread_unblock (t); + thread_yield (); return tid; }