Subject: CVS commit: src/sys/kern
To: None <source-changes@NetBSD.org>
From: Andrew Doran <ad@netbsd.org>
List: source-changes
Date: 10/03/2007 11:20:10
Module Name: src
Committed By: ad
Date: Wed Oct 3 11:20:10 UTC 2007
Modified Files:
src/sys/kern: kern_synch.c
Log Message:
- sched_yield: When yielding, drop the priority to MAXPRI ensuring that the
calling thread really does yield. The scheduler will adjust it back to a
reasonable level within 1 second. This contradicts POSIX, which specifies
that sched_yield() put the thread onto the back of its current runqueue.
However, POSIX doesn't really have any business specifying what should
happen for SCHED_OTHER (i.e. a timesharing scheduler like ours), and
Java, MySQL and libpthread rely on sched_yield() doing something useful.
- mi_switch: adjust spc_curpriority and newl->l_priority if we avoided
the runqueues and are doing a direct switch. Since nothing currently
does that, there should be no functional change.
To generate a diff of this commit:
cvs rdiff -r1.197 -r1.198 src/sys/kern/kern_synch.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.