[kaffe] CVS kaffe (guilhem): Check for thread subsystem initialization in jthread_*suspendall

Kaffe CVS cvs-commits at kaffe.org
Fri Apr 1 09:26:57 PST 2005


PatchSet 5636 
Date: 2005/04/01 17:21:50
Author: guilhem
Branch: HEAD
Tag: (none) 
Log:
Check for thread subsystem initialization in jthread_*suspendall

Members: 
	ChangeLog:1.3807->1.3808 
	kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.78->1.79 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3807 kaffe/ChangeLog:1.3808
--- kaffe/ChangeLog:1.3807	Fri Apr  1 17:00:51 2005
+++ kaffe/ChangeLog	Fri Apr  1 17:21:50 2005
@@ -1,5 +1,12 @@
 2005-04-01  Guilhem Lavaux  <guilhem at kaffe.org>
 
+	* kaffe/kaffevm/systems/unix-pthreads/thread-impl.c
+	(jthread_suspendall, jthread_unsuspendall): Check whether the thread
+	subsystem has been initialized as some architecture needs to invoke it
+	for compare and exchange.
+
+2005-04-01  Guilhem Lavaux  <guilhem at kaffe.org>
+
 	* kaffe/kaffevm/locks.c
 	(waitCond): Unlock completely the mutex (the lock may be recursive).
 
Index: kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c
diff -u kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.78 kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.79
--- kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.78	Mon Mar 28 19:32:52 2005
+++ kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c	Fri Apr  1 17:21:52 2005
@@ -1345,6 +1345,9 @@
   int		status;
   jthread_t	cur = jthread_current();
   volatile jthread_t	t;
+
+  if (!jthreadInitialized)
+    return;
  
   /* don't allow any new thread to be created or recycled until this is done */
   protectThreadList(cur);
@@ -1442,7 +1445,7 @@
   jthread_t	t;
   int		status;
 
-  if ( !critSection )
+  if ( !jthreadInitialized || !critSection )
 	return;
 
   if ( --critSection == 0 ){




More information about the kaffe mailing list