summaryrefslogtreecommitdiff
path: root/sys/kern/subr_sleepqueue.c
diff options
context:
space:
mode:
authorAttilio Rao <attilio@FreeBSD.org>2007-09-13 09:12:36 +0000
committerAttilio Rao <attilio@FreeBSD.org>2007-09-13 09:12:36 +0000
commitc7fb7ce53a68240a2281dcaa8c3e1e822993c35e (patch)
tree066a1c8cc8781a22a505854795195b4bb6a11e13 /sys/kern/subr_sleepqueue.c
parentb2adf5c8372440462d6cb9f2f00aff6275afcc0d (diff)
Notes
Diffstat (limited to 'sys/kern/subr_sleepqueue.c')
-rw-r--r--sys/kern/subr_sleepqueue.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/subr_sleepqueue.c b/sys/kern/subr_sleepqueue.c
index 911761df79cc..d0856f9c86b8 100644
--- a/sys/kern/subr_sleepqueue.c
+++ b/sys/kern/subr_sleepqueue.c
@@ -328,6 +328,7 @@ sleepq_add(void *wchan, struct lock_object *lock, const char *wmesg, int flags,
MPASS((flags & SLEEPQ_TYPE) == sq->sq_type);
LIST_INSERT_HEAD(&sq->sq_free, td->td_sleepqueue, sq_hash);
}
+ thread_lock(td);
TAILQ_INSERT_TAIL(&sq->sq_blocked[queue], td, td_slpq);
td->td_sleepqueue = NULL;
td->td_sqqueue = queue;
@@ -337,6 +338,7 @@ sleepq_add(void *wchan, struct lock_object *lock, const char *wmesg, int flags,
td->td_flags |= TDF_SINTR;
td->td_flags &= ~TDF_SLEEPABORT;
}
+ thread_unlock(td);
}
/*