Branch: Tag:

2001-04-07

2001-04-07 07:38:26 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

added mutex code to each memory object (for --with-unlocked)

Rev: src/array.c:1.103
Rev: src/array.h:1.33
Rev: src/constants.c:1.29
Rev: src/constants.h:1.17
Rev: src/mapping.h:1.36
Rev: src/multiset.c:1.33
Rev: src/multiset.h:1.18
Rev: src/object.c:1.167
Rev: src/object.h:1.61
Rev: src/pike_cpulib.c:1.2
Rev: src/pike_cpulib.h:1.9
Rev: src/pike_threadlib.h:1.1
Rev: src/program.c:1.309
Rev: src/program.h:1.123
Rev: src/svalue.h:1.87
Rev: src/threads.h:1.113

5:   \*/      /* -  * $Id: mapping.h,v 1.35 2001/03/23 03:14:40 hubbe Exp $ +  * $Id: mapping.h,v 1.36 2001/04/07 07:38:24 hubbe Exp $    */   #ifndef MAPPING_H   #define MAPPING_H
24:      struct mapping_data   { -  INT32 refs; +  PIKE_MEMORY_OBJECT_MEMBERS;    INT32 valrefs; /* lock values too */    INT32 hardlinks;    INT32 size, hashsize;
41:      struct mapping   { -  INT32 refs; - #ifdef PIKE_SECURITY -  struct object *prot; - #endif +  PIKE_MEMORY_OBJECT_MEMBERS;   #ifdef MAPPING_SIZE_DEBUG    INT32 debug_size;   #endif
75:   #define free_mapping_data(M) do{ \    struct mapping_data *md_=(M); \    debug_malloc_touch(md_); \ -  if(!--md_->refs) really_free_mapping_data(md_); \ +  if(!sub_ref(md_)) really_free_mapping_data(md_); \    /* FIXME: What about valrefs & hardlinks? */ \   }while(0)