Branch: Tag:

2003-03-31

2003-03-31 18:43:05 by Henrik Grubbström (Grubba) <grubba@grubba.org>

More thread-related fixes.

Rev: src/modules/Java/jvm.c:1.45
Rev: src/threads.c:1.167

1:   #include "global.h" - RCSID("$Id: threads.c,v 1.166 2003/03/05 16:18:24 mast Exp $"); + RCSID("$Id: threads.c,v 1.167 2003/03/31 18:43:05 grubba Exp $");      PMOD_EXPORT int num_threads = 1;   PMOD_EXPORT int threads_disabled = 0;
649:    Pike_interpreter.stack_top=((char *)&data)+ (thread_stack_size-16384) * STACK_DIRECTION;    Pike_interpreter.recoveries = NULL;    SWAP_OUT_THREAD(OBJ2THREAD(Pike_interpreter.thread_id)); /* Init struct */ +  Pike_interpreter.thread_id=arg.id;    OBJ2THREAD(Pike_interpreter.thread_id)->swapped=0;      #if defined(PIKE_DEBUG)
1569:    if(!mutex_key)    fatal("Failed to initialize thread program!\n");    -  Pike_interpreter.thread_id=clone_object(thread_id_prog,0); +  { +  struct object *o = Pike_interpreter.thread_id = +  clone_object(thread_id_prog,0);    SWAP_OUT_THREAD(OBJ2THREAD(Pike_interpreter.thread_id)); /* Init struct */ -  +  Pike_interpreter.thread_id = o; +  }    OBJ2THREAD(Pike_interpreter.thread_id)->id=th_self();    OBJ2THREAD(Pike_interpreter.thread_id)->swapped=0;    thread_table_insert(Pike_interpreter.thread_id);