add primitive support for multithreading
[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 };
14
15 #ifdef THREADS
16 void checkcollect(void * ptr);
17 struct listitem * stopforgc(struct garbagelist * ptr);
18 void restartaftergc(struct listitem * litem);
19 #endif
20 void collect(struct garbagelist *stackptr);
21 int gc_createcopy(void * orig, void **);
22 void * mygcmalloc(struct garbagelist * ptr, int size);
23 #endif