From: falcovorbis <fal...@us...> - 2024-10-09 02:12:33
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 4dd3433c258cb1e7bf3de599c50c49ad5181e851 (commit) from b2e9b3801754e805a345ae923bf290c4c847a04a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 4dd3433c258cb1e7bf3de599c50c49ad5181e851 Author: Paul Cercueil <pa...@cr...> Date: Wed Oct 9 04:12:12 2024 +0200 thread: Improve priority boosting (#801) When failing to obtain an already locked mutex owned by a thread with the same priority than us, we want the other thread to be bumped to the front of the queue, not to the end of the queue. Signed-off-by: Paul Cercueil <pa...@cr...> ----------------------------------------------------------------------- Summary of changes: kernel/thread/mutex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/thread/mutex.c b/kernel/thread/mutex.c index afcd680c..3d438965 100644 --- a/kernel/thread/mutex.c +++ b/kernel/thread/mutex.c @@ -139,7 +139,7 @@ int mutex_lock_timed(mutex_t *m, int timeout) { /* Thread list is sorted by priority, update the position * of the thread holding the lock */ thd_remove_from_runnable(m->holder); - thd_add_to_runnable(m->holder, 0); + thd_add_to_runnable(m->holder, true); } rv = genwait_wait(m, timeout ? "mutex_lock_timed" : "mutex_lock", hooks/post-receive -- A pseudo Operating System for the Dreamcast. |