From b0976eac74a22b8e99cf8e239a4f39c140b6a69f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sun, 12 Mar 2006 17:24:31 +0000 Subject: [PATCH] * Reduced the effects of "priority boost on sem release" to a minimum; the thread priority is now increased by one, we'll see how that turns out for real (I'm not even convinced that this feature is a good idea at all yet). * Enabled debugging the last semaphore acquirer by default. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16744 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/sem.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/system/kernel/sem.c b/src/system/kernel/sem.c index 31bd47aac1..d3d60777c1 100644 --- a/src/system/kernel/sem.c +++ b/src/system/kernel/sem.c @@ -36,7 +36,7 @@ # define TRACE(x) ; #endif -//#define DEBUG_LAST_ACQUIRER +#define DEBUG_LAST_ACQUIRER struct sem_entry { sem_id id; @@ -713,10 +713,9 @@ release_sem_etc(sem_id id, int32 count, uint32 flags) GRAB_THREAD_LOCK(); while ((thread = thread_dequeue(&releaseQueue)) != NULL) { - // temporarily place thread in a run queue with high priority to boost it up - // TODO: isn't realtime priority a bit too much?? + // temporarily place thread in a run queue with a higher priority to boost it up thread->next_priority = thread->priority >= B_FIRST_REAL_TIME_PRIORITY ? - thread->priority : B_FIRST_REAL_TIME_PRIORITY - 1; + thread->priority : thread->priority + 1; scheduler_enqueue_in_run_queue(thread); } if ((flags & B_DO_NOT_RESCHEDULE) == 0)