Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: java_lang_Thread.c 8132 2007-06-22 11:15:47Z twisti $
+ $Id: java_lang_Thread.c 8272 2007-08-08 14:55:00Z twisti $
*/
threadobject *t;
# if defined(WITH_CLASSPATH_GNU)
+
t = (threadobject *) this->vmThread->vmdata;
+
# elif defined(WITH_CLASSPATH_SUN)
+
/* XXX this is just a quick hack */
for (t = threads_list_first(); t != NULL; t = threads_list_next(t)) {
if (t == NULL)
return 0;
+
# elif defined(WITH_CLASSPATH_CLDC1_1)
+
t = (threadobject *) this->vm_thread;
+
+ if (t == NULL)
+ return 0;
+
# else
# error unknown classpath configuration
# endif
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: threads-common.c 8266 2007-08-07 08:26:38Z twisti $
+ $Id: threads-common.c 8272 2007-08-08 14:55:00Z twisti $
*/
#include "config.h"
#include <assert.h>
+#include <stdint.h>
#include <unistd.h>
#include "vm/types.h"
void threads_thread_free(threadobject *t)
{
- s4 index;
+ int32_t index;
+ uint32_t state;
/* lock the threads-lists */
list_remove_unsynced(list_threads, t);
- /* Clear memory, but keep the thread-index. */
+ /* Clear memory, but keep the thread-index and the
+ thread-state. */
+
/* ATTENTION: Do this after list_remove, otherwise the linkage
pointers are invalid. */
index = t->index;
+ state = t->state;
MZERO(t, threadobject, 1);
t->index = index;
+ t->state = state;
/* add the thread to the free list */