* 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
This commit is contained in:
parent
f025cd8b72
commit
b0976eac74
|
@ -36,7 +36,7 @@
|
||||||
# define TRACE(x) ;
|
# define TRACE(x) ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//#define DEBUG_LAST_ACQUIRER
|
#define DEBUG_LAST_ACQUIRER
|
||||||
|
|
||||||
struct sem_entry {
|
struct sem_entry {
|
||||||
sem_id id;
|
sem_id id;
|
||||||
|
@ -713,10 +713,9 @@ release_sem_etc(sem_id id, int32 count, uint32 flags)
|
||||||
|
|
||||||
GRAB_THREAD_LOCK();
|
GRAB_THREAD_LOCK();
|
||||||
while ((thread = thread_dequeue(&releaseQueue)) != NULL) {
|
while ((thread = thread_dequeue(&releaseQueue)) != NULL) {
|
||||||
// temporarily place thread in a run queue with high priority to boost it up
|
// temporarily place thread in a run queue with a higher priority to boost it up
|
||||||
// TODO: isn't realtime priority a bit too much??
|
|
||||||
thread->next_priority = thread->priority >= B_FIRST_REAL_TIME_PRIORITY ?
|
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);
|
scheduler_enqueue_in_run_queue(thread);
|
||||||
}
|
}
|
||||||
if ((flags & B_DO_NOT_RESCHEDULE) == 0)
|
if ((flags & B_DO_NOT_RESCHEDULE) == 0)
|
||||||
|
|
Loading…
Reference in New Issue