summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-12-04 05:37:41 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-12-04 05:37:41 +0000
commitf6a07816a0c5f2914d8f20b99e2a4c01016f708b (patch)
treef321c0eea5020cf381af3ee599e6dc09fcd9b8b4
parent9b2fbf28b2ec73a28a0c21c813ab4497897a8ded (diff)
Faster splassert_check()
-rw-r--r--sys/arch/m88k/m88k/trap.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/arch/m88k/m88k/trap.c b/sys/arch/m88k/m88k/trap.c
index 19b2c18257d..793a5f0a44a 100644
--- a/sys/arch/m88k/m88k/trap.c
+++ b/sys/arch/m88k/m88k/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.56 2007/12/04 05:36:34 miod Exp $ */
+/* $OpenBSD: trap.c,v 1.57 2007/12/04 05:37:40 miod Exp $ */
/*
* Copyright (c) 2004, Miodrag Vallat.
* Copyright (c) 1998 Steve Murphree, Jr.
@@ -1697,14 +1697,15 @@ splassert_check(int wantipl, const char *func)
{
int oldipl;
- /*
- * This will raise the spl if too low,
- * in a feeble attempt to reduce further damage.
- */
- oldipl = raiseipl(wantipl);
+ oldipl = getipl();
if (oldipl < wantipl) {
splassert_fail(wantipl, oldipl, func);
+ /*
+ * This will raise the spl,
+ * in a feeble attempt to reduce further damage.
+ */
+ (void)raiseipl(wantipl);
}
}
#endif