Branch: Tag:

2000-03-24

2000-03-24 01:24:52 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

more dmalloc...

Rev: src/block_alloc.h:1.18
Rev: src/builtin_functions.c:1.246
Rev: src/errors.h:1.9
Rev: src/interpret.c:1.137
Rev: src/interpret.h:1.38
Rev: src/interpreter.h:1.36
Rev: src/object.c:1.95
Rev: src/operators.c:1.87
Rev: src/pike_memory.c:1.59
Rev: src/program.c:1.214
Rev: src/security.c:1.25
Rev: src/signal_handler.c:1.168
Rev: src/threads.c:1.113
Rev: src/threads.h:1.75

1:   #include "global.h" - RCSID("$Id: threads.c,v 1.112 2000/03/17 05:12:30 hubbe Exp $"); + RCSID("$Id: threads.c,v 1.113 2000/03/24 01:24:52 hubbe Exp $");      int num_threads = 1;   int threads_disabled = 0;
194:   #endif       - #define THIS_THREAD ((struct thread_state *)fp->current_storage) + #define THIS_THREAD ((struct thread_state *)CURRENT_STORAGE)      struct object *thread_id = NULL;   static struct callback *threads_evaluator_callback=0;
632:    THREADS_FPRINTF(0, (stderr,"THREADS_ALLOW() Thread %08x done\n",    (unsigned int)thread_id));    +  cleanup_interpret(); +  DO_IF_DMALLOC( +  SWAP_OUT_THREAD(OBJ2THREAD(thread_id)); /* de-Init struct */ +  OBJ2THREAD(thread_id)->swapped=0; +  )    thread_table_delete(thread_id);    free_object(thread_id);    thread_id=0; -  cleanup_interpret(); +     num_threads--;    if(!num_threads && threads_evaluator_callback)    {
708:    ref_push_object(thread_id);   }    - #define THIS_MUTEX ((struct mutex_storage *)(fp->current_storage)) + #define THIS_MUTEX ((struct mutex_storage *)(CURRENT_STORAGE))         /* Note:
880:    co_destroy(& THIS_MUTEX->condition);   }    - #define THIS_KEY ((struct key_storage *)(fp->current_storage)) + #define THIS_KEY ((struct key_storage *)(CURRENT_STORAGE))   void init_mutex_key_obj(struct object *o)   {    THREADS_FPRINTF(1, (stderr, "KEY k:%08x, o:%08x\n",
916:    }   }    - #define THIS_COND ((COND_T *)(fp->current_storage)) + #define THIS_COND ((COND_T *)(CURRENT_STORAGE))   void f_cond_wait(INT32 args)   {    COND_T *c;
1082:   {    struct svalue key;    struct mapping *m; -  key.u.integer = ((struct thread_local *)fp->current_storage)->id; +  key.u.integer = ((struct thread_local *)CURRENT_STORAGE)->id;    key.type = T_INT;    key.subtype = NUMBER_NUMBER;    pop_n_elems(args);
1099:   {    struct svalue key;    struct mapping *m; -  key.u.integer = ((struct thread_local *)fp->current_storage)->id; +  key.u.integer = ((struct thread_local *)CURRENT_STORAGE)->id;    key.type = T_INT;    key.subtype = NUMBER_NUMBER;    if(args>1)