diff options
author | jeff <jeff@FreeBSD.org> | 2007-06-05 00:00:57 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2007-06-05 00:00:57 +0000 |
commit | 91d150179059555ef497f4b5b5a560fdb24e472f (patch) | |
tree | 6727b982fa0d93b8aafab313bdc797aee9e314d2 /sys/ia64 | |
parent | 8297f778b9d0a595a99ca58d332ab4111b636019 (diff) | |
download | FreeBSD-src-91d150179059555ef497f4b5b5a560fdb24e472f.zip FreeBSD-src-91d150179059555ef497f4b5b5a560fdb24e472f.tar.gz |
Commit 14/14 of sched_lock decomposition.
- Use thread_lock() rather than sched_lock for per-thread scheduling
sychronization.
- Use the per-process spinlock rather than the sched_lock for per-process
scheduling synchronization.
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)
Diffstat (limited to 'sys/ia64')
-rw-r--r-- | sys/ia64/ia64/pmap.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/ia64/ia64/pmap.c b/sys/ia64/ia64/pmap.c index 8879fd7..0a0694e 100644 --- a/sys/ia64/ia64/pmap.c +++ b/sys/ia64/ia64/pmap.c @@ -2235,8 +2235,7 @@ pmap_switch(pmap_t pm) pmap_t prevpm; int i; - mtx_assert(&sched_lock, MA_OWNED); - + THREAD_LOCK_ASSERT(curthread, MA_OWNED); prevpm = PCPU_GET(current_pmap); if (prevpm == pm) return (prevpm); @@ -2263,10 +2262,13 @@ static pmap_t pmap_install(pmap_t pm) { pmap_t prevpm; + struct thread *td; - mtx_lock_spin(&sched_lock); + td = curthread; + thread_lock(td); prevpm = pmap_switch(pm); - mtx_unlock_spin(&sched_lock); + thread_unlock(td); + return (prevpm); } |