summaryrefslogtreecommitdiff
path: root/sys/netsmb/smb_trantcp.c
diff options
context:
space:
mode:
authorJeff Roberson <jeff@FreeBSD.org>2007-06-05 00:00:57 +0000
committerJeff Roberson <jeff@FreeBSD.org>2007-06-05 00:00:57 +0000
commit982d11f836278f1e95ae1ae398aa4d1d07a19006 (patch)
tree6727b982fa0d93b8aafab313bdc797aee9e314d2 /sys/netsmb/smb_trantcp.c
parenta8cdbf449a61645a36419c3ae4f1134fc39d8f8e (diff)
Notes
Diffstat (limited to 'sys/netsmb/smb_trantcp.c')
-rw-r--r--sys/netsmb/smb_trantcp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/netsmb/smb_trantcp.c b/sys/netsmb/smb_trantcp.c
index 5db6b7e47573..3f4ccaffa208 100644
--- a/sys/netsmb/smb_trantcp.c
+++ b/sys/netsmb/smb_trantcp.c
@@ -115,9 +115,9 @@ nbssn_rselect(struct nbpcb *nbp, struct timeval *tv, int events,
retry:
ncoll = nselcoll;
- mtx_lock_spin(&sched_lock);
+ thread_lock(td);
td->td_flags |= TDF_SELECT;
- mtx_unlock_spin(&sched_lock);
+ thread_unlock(td);
mtx_unlock(&sellock);
/* XXX: Should be done when the thread is initialized. */
@@ -144,12 +144,12 @@ retry:
* the process, test P_SELECT and rescan file descriptors if
* necessary.
*/
- mtx_lock_spin(&sched_lock);
+ thread_lock(td);
if ((td->td_flags & TDF_SELECT) == 0 || nselcoll != ncoll) {
- mtx_unlock_spin(&sched_lock);
+ thread_unlock(td);
goto retry;
}
- mtx_unlock_spin(&sched_lock);
+ thread_unlock(td);
if (timo > 0)
error = cv_timedwait(&selwait, &sellock, timo);
@@ -161,9 +161,9 @@ retry:
done:
clear_selinfo_list(td);
- mtx_lock_spin(&sched_lock);
+ thread_lock(td);
td->td_flags &= ~TDF_SELECT;
- mtx_unlock_spin(&sched_lock);
+ thread_unlock(td);
mtx_unlock(&sellock);
done_noproclock: