more changes
[IRC.git] / Robust / src / Runtime / bamboo / pmc_garbage.h
index dc3e2025859d8c3585961a305911df198347d1b0..2be0312eccccc276f86cb47355991d96e3aaa18f 100644 (file)
@@ -1,22 +1,40 @@
 #ifndef PMC_GARBAGE_H
 #define PMC_GARBAGE_H
+#include <tmc/spin.h>
+
+#define NUMPMCUNITS (4*NUMCORES4GC)
+#define UNITSIZE (BAMBOO_SHARED_MEM_SIZE/NUMPMCUNITS)
+
 struct pmc_unit {
-  unsigned int lock;
+  tmc_spin_mutex_t lock;
   unsigned int numbytes;
+  unsigned int regionnum;
+  void * endptr;
 };
 
 struct pmc_region {
+  void * allocptr;
   void * lastptr;
+  void * startptr;
+  void * endptr;
+  tmc_spin_mutex_t lock;
   struct ___Object___ * lastobj;
+  struct pmc_queue markqueue;
 };
 
 struct pmc_heap {
-  struct pmc_region units[NUMCORES4GC*4];
+  struct pmc_region units[NUMPMCUNITS];
   struct pmc_region regions[NUMCORES4GC];
-  unsigned int lock;
-  unsigned int numthreads;
+  tmc_spin_mutex_t lock;
+  volatile unsigned int numthreads;
 };
 
 extern struct pmc_heap * pmc_heapptr;
+extern struct pmc_queue * pmc_localqueue;
 
+void incrementthreads();
+void decrementthreads();
+void pmc_onceInit();
+void pmc_init();
+void gc(struct garbagelist *gl);
 #endif