summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_sx.c
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2012-09-13 22:26:22 +0000
committerattilio <attilio@FreeBSD.org>2012-09-13 22:26:22 +0000
commitd63ec4c4ce1de03b00bdd4813aeee11ee77907ea (patch)
tree98cf642eabc284875d15c5dcbebba86797df11e9 /sys/kern/kern_sx.c
parent5bb226a48fff4750ea9116c30966dec033b67f4c (diff)
downloadFreeBSD-src-d63ec4c4ce1de03b00bdd4813aeee11ee77907ea.zip
FreeBSD-src-d63ec4c4ce1de03b00bdd4813aeee11ee77907ea.tar.gz
Remove all the checks on curthread != NULL with the exception of some MD
trap checks (eg. printtrap()). Generally this check is not needed anymore, as there is not a legitimate case where curthread != NULL, after pcpu 0 area has been properly initialized. Reviewed by: bde, jhb MFC after: 1 week
Diffstat (limited to 'sys/kern/kern_sx.c')
-rw-r--r--sys/kern/kern_sx.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/sys/kern/kern_sx.c b/sys/kern/kern_sx.c
index 487a324..af2391f 100644
--- a/sys/kern/kern_sx.c
+++ b/sys/kern/kern_sx.c
@@ -249,7 +249,6 @@ _sx_slock(struct sx *sx, int opts, const char *file, int line)
if (SCHEDULER_STOPPED())
return (0);
- MPASS(curthread != NULL);
KASSERT(!TD_IS_IDLETHREAD(curthread),
("sx_slock() by idle thread %p on sx %s @ %s:%d",
curthread, sx->lock_object.lo_name, file, line));
@@ -303,7 +302,6 @@ _sx_xlock(struct sx *sx, int opts, const char *file, int line)
if (SCHEDULER_STOPPED())
return (0);
- MPASS(curthread != NULL);
KASSERT(!TD_IS_IDLETHREAD(curthread),
("sx_xlock() by idle thread %p on sx %s @ %s:%d",
curthread, sx->lock_object.lo_name, file, line));
@@ -330,7 +328,6 @@ sx_try_xlock_(struct sx *sx, const char *file, int line)
if (SCHEDULER_STOPPED())
return (1);
- MPASS(curthread != NULL);
KASSERT(!TD_IS_IDLETHREAD(curthread),
("sx_try_xlock() by idle thread %p on sx %s @ %s:%d",
curthread, sx->lock_object.lo_name, file, line));
@@ -361,7 +358,6 @@ _sx_sunlock(struct sx *sx, const char *file, int line)
if (SCHEDULER_STOPPED())
return;
- MPASS(curthread != NULL);
KASSERT(sx->sx_lock != SX_LOCK_DESTROYED,
("sx_sunlock() of destroyed sx @ %s:%d", file, line));
_sx_assert(sx, SA_SLOCKED, file, line);
@@ -378,7 +374,6 @@ _sx_xunlock(struct sx *sx, const char *file, int line)
if (SCHEDULER_STOPPED())
return;
- MPASS(curthread != NULL);
KASSERT(sx->sx_lock != SX_LOCK_DESTROYED,
("sx_xunlock() of destroyed sx @ %s:%d", file, line));
_sx_assert(sx, SA_XLOCKED, file, line);
OpenPOWER on IntegriCloud