diff options
author | tjr <tjr@FreeBSD.org> | 2004-06-03 01:47:37 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2004-06-03 01:47:37 +0000 |
commit | 7a46b27935d2825aabd5792cab33c94cc1096b0a (patch) | |
tree | 4ec923639b76e4b631bd73b4a91f5dd83dbbfce9 /sys/sparc64 | |
parent | de0c6ecd474a085a3ee08011f10c2eb1c99fd0bc (diff) | |
download | FreeBSD-src-7a46b27935d2825aabd5792cab33c94cc1096b0a.zip FreeBSD-src-7a46b27935d2825aabd5792cab33c94cc1096b0a.tar.gz |
Move TDF_DEADLKTREAT into td_pflags (and rename it accordingly) to avoid
having to acquire sched_lock when manipulating it in lockmgr(), uiomove(),
and uiomove_fromphys().
Reviewed by: jhb
Diffstat (limited to 'sys/sparc64')
-rw-r--r-- | sys/sparc64/sparc64/uio_machdep.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sys/sparc64/sparc64/uio_machdep.c b/sys/sparc64/sparc64/uio_machdep.c index b096049..8aef4fa 100644 --- a/sys/sparc64/sparc64/uio_machdep.c +++ b/sys/sparc64/sparc64/uio_machdep.c @@ -77,10 +77,8 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) KASSERT(uio->uio_segflg != UIO_USERSPACE || uio->uio_td == curthread, ("uiomove_fromphys proc")); if (td != NULL) { - mtx_lock_spin(&sched_lock); - save = td->td_flags & TDF_DEADLKTREAT; - td->td_flags |= TDF_DEADLKTREAT; - mtx_unlock_spin(&sched_lock); + save = td->td_pflags & TDP_DEADLKTREAT; + td->td_pflags |= TDP_DEADLKTREAT; } while (n > 0 && uio->uio_resid) { iov = uio->uio_iov; @@ -133,10 +131,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) n -= cnt; } out: - if (td != NULL && save == 0) { - mtx_lock_spin(&sched_lock); - td->td_flags &= ~TDF_DEADLKTREAT; - mtx_unlock_spin(&sched_lock); - } + if (td != NULL && save == 0) + td->td_pflags &= ~TDP_DEADLKTREAT; return (error); } |