pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:1:   #include "global.h" - RCSID("$Id: threads.c,v 1.181 2002/09/14 00:57:27 mast Exp $"); + RCSID("$Id: threads.c,v 1.182 2002/09/14 02:46:27 mast 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:15:   #include "constants.h"   #include "program.h"   #include "program_id.h"   #include "gc.h"   #include "main.h"   #include "module_support.h"   #include "pike_types.h"   #include "operators.h"   #include "bignum.h"   #include "signal_handler.h" + #include "rusage.h"      #include <errno.h>      PMOD_EXPORT int live_threads = 0, disallow_live_threads = 0;   PMOD_EXPORT COND_T live_threads_change;   PMOD_EXPORT COND_T threads_disabled_change;   PMOD_EXPORT size_t thread_stack_size=256 * 1204;      /* SCO magic... */   int __thread_sys_behavior = 1;
pike.git/src/threads.c:768:    )    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;    } +  + #ifdef INTERNAL_PROFILING +  fprintf (stderr, "Thread usage summary:\n"); +  debug_print_rusage (stderr); + #endif +     /* FIXME: What about threads_disable? */    mt_unlock_interpreter();    th_exit(0);    /* NOT_REACHED, but removes a warning */    return(0);   }      #ifdef UNIX_THREADS   int num_lwps = 1;   #endif