Commit 13/14 of sched_lock decomposition.

- Add a new parameter to cpu_switch() that is used to release the lock on
   the outgoing thread and properly acquire the lock on the incoming
   thread.  This parameter is not required for schedulers that don't do
   per-cpu locking and architectures which do not support it may continue
   to use the 4BSD scheduler.  This feature is presently not supported
   on ia64

Tested by:      kris, current@
Tested on:      i386, amd64, ULE, 4BSD, libthr, libkse, PREEMPTION, etc.
Discussed with: kris, attilio, kmacy, jhb, julian, bde (small parts each)
This commit is contained in:
Jeff Roberson 2007-06-04 23:58:47 +00:00
parent 1b1618fb12
commit a8cdbf449a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=170306

View File

@ -356,7 +356,7 @@ cpu_reset()
}
void
cpu_switch(struct thread *old, struct thread *new)
cpu_switch(struct thread *old, struct thread *new, struct mtx *mtx)
{
struct pcb *oldpcb, *newpcb;