summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/kern/kern_synch.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-12-09 14:19:03 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-01-10 09:53:34 +0100
commit75b706fde4cbf82bcd41a1cec319778aa0f8eb2d (patch)
treeea39a351a1f6337b5a5dd6036314693adef5ffe6 /freebsd/sys/kern/kern_synch.c
parentVMSTAT(8): Port to RTEMS (diff)
downloadrtems-libbsd-75b706fde4cbf82bcd41a1cec319778aa0f8eb2d.tar.bz2
Update to FreeBSD head 2016-12-10
Git mirror commit 80c55f08a05ab3b26a73b226ccb56adc3122a55c.
Diffstat (limited to 'freebsd/sys/kern/kern_synch.c')
-rw-r--r--freebsd/sys/kern/kern_synch.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/freebsd/sys/kern/kern_synch.c b/freebsd/sys/kern/kern_synch.c
index 6ecedfd2..6a8e7754 100644
--- a/freebsd/sys/kern/kern_synch.c
+++ b/freebsd/sys/kern/kern_synch.c
@@ -17,7 +17,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
@@ -191,13 +191,7 @@ _sleep(void *ident, struct lock_object *lock, int priority,
pri = priority;
#endif /* __rtems__ */
- /*
- * If we are already on a sleep queue, then remove us from that
- * sleep queue first. We have to do this to handle recursive
- * sleeps.
- */
- if (TD_ON_SLEEPQ(td))
- sleepq_remove(td, td->td_wchan);
+ KASSERT(!TD_ON_SLEEPQ(td), ("recursive sleep"));
if ((uint8_t *)ident >= &pause_wchan[0] &&
(uint8_t *)ident <= &pause_wchan[MAXCPU - 1])