pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: threads.c,v 1.195 2003/03/31 18:35:47 grubba Exp $ + || $Id: threads.c,v 1.196 2003/04/01 14:19:11 grubba Exp $   */      #include "global.h" - RCSID("$Id: threads.c,v 1.195 2003/03/31 18:35:47 grubba Exp $"); + RCSID("$Id: threads.c,v 1.196 2003/04/01 14:19:11 grubba Exp $");      PMOD_EXPORT int num_threads = 1;   PMOD_EXPORT int threads_disabled = 0;      #ifdef _REENTRANT   #include "threads.h"   #include "array.h"   #include "mapping.h"   #include "object.h"   #include "pike_macros.h"
pike.git/src/threads.c:794:    OBJ2THREAD(Pike_interpreter.thread_id)->status=THREAD_EXITED;    co_broadcast(& OBJ2THREAD(Pike_interpreter.thread_id)->status_change);       free((char *)data); /* Moved by per, to avoid some bugs.... */    UNSETJMP(back);       THREADS_FPRINTF(0, (stderr,"THREADS_ALLOW() Thread %08x done\n",    (unsigned int)Pike_interpreter.thread_id));       cleanup_interpret(); -  DO_IF_DMALLOC( +  DO_IF_DMALLOC({ +  struct object *o = Pike_interpreter.thread_id;    SWAP_OUT_THREAD(OBJ2THREAD(Pike_interpreter.thread_id)); /* de-Init struct */ -  +  Pike_interpreter.thread_id = o;    OBJ2THREAD(Pike_interpreter.thread_id)->swapped=0; -  ) +  })    thread_table_delete(Pike_interpreter.thread_id);    free_object(Pike_interpreter.thread_id);    Pike_interpreter.thread_id=0;    num_threads--;    if(!num_threads && threads_evaluator_callback)    {    remove_callback(threads_evaluator_callback);    threads_evaluator_callback=0;    }