inline the gc check
[IRC.git] / Robust / src / Runtime / garbage.h
1 #ifndef GARBAGE_H
2 #define GARBAGE_H
3 struct garbagelist {
4   int size;
5   struct garbagelist *next;
6   void * array[];
7 };
8
9 struct listitem {
10   struct listitem * prev;
11   struct listitem * next;
12   struct garbagelist * stackptr;
13   struct ___Object___ * locklist;
14 };
15
16 #ifdef TASK
17 void fixtags();
18 #endif
19
20 #if defined(THREADS)||defined(DSTM)
21 extern int needtocollect;
22 void checkcollect(void * ptr);
23 struct listitem * stopforgc(struct garbagelist * ptr);
24 void restartaftergc(struct listitem * litem);
25 #endif
26 void * tomalloc(int size);
27 void collect(struct garbagelist *stackptr);
28 int gc_createcopy(void * orig, void **);
29 void * mygcmalloc(struct garbagelist * ptr, int size);
30 #endif