big update for forwarding lists and dependency counts, stable compile but seg faults
[IRC.git] / Robust / src / Runtime / garbage.h
1 #ifndef GARBAGE_H
2 #define GARBAGE_H
3 #ifdef STM
4 #include "stmlookup.h"
5 #endif
6 struct garbagelist {
7   int size;
8   struct garbagelist *next;
9   void * array[];
10 };
11
12 struct listitem {
13   struct listitem * prev;
14   struct listitem * next;
15   struct garbagelist * stackptr;
16 #ifdef THREADS
17   struct ___Object___ * locklist;
18 #endif
19 #ifdef STM
20   unsigned int tc_size;
21   cliststruct_t **tc_structs;
22   chashlistnode_t **tc_table;
23   chashlistnode_t **tc_list;
24   struct objlist * objlist;
25 #ifdef STMSTATS
26   struct objlist * lockedlist;
27 #endif
28   char **base;
29 #endif
30 };
31
32 #ifdef TASK
33 void fixtags();
34 #endif
35
36 #if defined(THREADS)||defined(DSTM)||defined(STM)
37 extern int needtocollect;
38 void checkcollect(void * ptr);
39 void stopforgc(struct garbagelist * ptr);
40 void restartaftergc();
41 #endif
42 void * tomalloc(int size);
43 void collect(struct garbagelist *stackptr);
44 int gc_createcopy(void * orig, void **);
45 void * mygcmalloc(struct garbagelist * ptr, int size);
46 #endif
47 #ifdef STM
48 void fixtable(chashlistnode_t **, chashlistnode_t **, cliststruct_t **, unsigned int);
49 #endif