aboutsummaryrefslogtreecommitdiff
path: root/libjava/no-threads.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/no-threads.cc')
-rw-r--r--libjava/no-threads.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/libjava/no-threads.cc b/libjava/no-threads.cc
index 22c30f6..98ebc13 100644
--- a/libjava/no-threads.cc
+++ b/libjava/no-threads.cc
@@ -20,7 +20,10 @@ void
_Jv_ThreadStart (java::lang::Thread *thread, _Jv_Thread_t *,
_Jv_ThreadStartFunc *meth)
{
- JvAssert (! _Jv_OnlyThread);
+ // Don't use JvAssert, since we want this to fail even when compiled
+ // without assertions.
+ if (_Jv_OnlyThread)
+ JvFail ("only thread already running");
_Jv_OnlyThread = thread;
(*meth) (thread);
}