From: bdemsky Date: Thu, 7 Jul 2011 00:54:16 +0000 (+0000) Subject: some changes towards compilation X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=85ff73041067e8c98057a2015e394cbdc6a60b59;p=IRC.git some changes towards compilation --- diff --git a/Robust/src/Runtime/bamboo/pmc_forward.c b/Robust/src/Runtime/bamboo/pmc_forward.c index 94d3fd90..dcf767b0 100644 --- a/Robust/src/Runtime/bamboo/pmc_forward.c +++ b/Robust/src/Runtime/bamboo/pmc_forward.c @@ -8,8 +8,8 @@ void pmc_count() { for(int i=0;iunits[i].lock)) { //got lock - void *unitbase=(i==0)?gcbaseva:pmc_heapptr->units[i-1]->endptr; - void *unittop=pmc_heapptr->units[i]->endptr; + void *unitbase=(i==0)?gcbaseva:pmc_heapptr->units[i-1].endptr; + void *unittop=pmc_heapptr->units[i].endptr; pmc_countbytes(&pmc_heapptr->units[i], unitbase, unittop); } } @@ -143,7 +143,7 @@ void pmc_forward(struct pmc_region *region, unsigned int totalbytes, void *botto forwardptr=newforwardptr; if (lastobj&&!fwddirection) { - tmpptr->backward=lastobj; + ((struct ___Object___ *)tmpptr)->backward=lastobj; lastobj=(struct ___Object___ *)tmpptr; } } diff --git a/Robust/src/Runtime/bamboo/pmc_garbage.c b/Robust/src/Runtime/bamboo/pmc_garbage.c index 46285737..65264f27 100644 --- a/Robust/src/Runtime/bamboo/pmc_garbage.c +++ b/Robust/src/Runtime/bamboo/pmc_garbage.c @@ -1,6 +1,6 @@ -#include "pmc_garbage.h" #include "multicoregc.h" -#inclued "runtime_arch.h" +#include "pmc_garbage.h" +#include "runtime_arch.h" struct pmc_queue * pmc_localqueue; @@ -21,7 +21,7 @@ void * pmc_unitend(unsigned int index) { } void pmc_onceInit() { - pmc_localqueue=&pmc_heapptr->regions[BAMBOO_NUM_OF_THREADS].markqueue; + pmc_localqueue=&pmc_heapptr->regions[BAMBOO_NUM_OF_CORE].markqueue; pmc_queueinit(pmc_localqueue); tmc_spin_barrier_init(&pmc_heapptr->barrier, NUMCORES4GC); for(int i=0;inumthreads=NUMCORES4GC; } tmc_spin_barrier_wait(&pmc_heapptr->barrier); @@ -44,7 +44,7 @@ void gc(struct garbagelist *gl) { pmc_count(); tmc_spin_barrier_wait(&pmc_heapptr->barrier); //divide up work - if (BAMBOO_NUM_OF_THREADS==STARTUPCORE) { + if (BAMBOO_NUM_OF_CORE==STARTUPCORE) { pmc_processunits(); } tmc_spin_barrier_wait(&pmc_heapptr->barrier); diff --git a/Robust/src/Runtime/bamboo/pmc_mark.c b/Robust/src/Runtime/bamboo/pmc_mark.c index dc933ed0..66413aa3 100644 --- a/Robust/src/Runtime/bamboo/pmc_mark.c +++ b/Robust/src/Runtime/bamboo/pmc_mark.c @@ -2,6 +2,8 @@ #include "pmc_garbage.h" #include "multicoremgc.h" #include +#include "runtime.h" +#include "thread.h" #define PMC_MARKOBJ(objptr) {void * marktmpptr=objptr; if (marktmpptr!=NULL) {pmc_markObj(marktmpptr);}} diff --git a/Robust/src/Runtime/bamboo/pmc_mem.c b/Robust/src/Runtime/bamboo/pmc_mem.c index 6179a3b7..a53fb4ba 100644 --- a/Robust/src/Runtime/bamboo/pmc_mem.c +++ b/Robust/src/Runtime/bamboo/pmc_mem.c @@ -1,3 +1,4 @@ +#include #include "pmc_garbage.h" #include "pmc_mem.h" @@ -17,7 +18,7 @@ void * pmc_alloc(unsigned int * numbytesallocated, unsigned int minimumbytes) { if ((finishptr-startptr)lowunit; - unsigned int endindex=pmc_heapptr->regions[i+1]->highunit; + unsigned int endindex=pmc_heapptr->regions[i+1].highunit; void * newstartptr=startptr+memcheck; //update unit end points diff --git a/Robust/src/Runtime/bamboo/pmc_refupdate.c b/Robust/src/Runtime/bamboo/pmc_refupdate.c index be58e88c..d6ccf460 100644 --- a/Robust/src/Runtime/bamboo/pmc_refupdate.c +++ b/Robust/src/Runtime/bamboo/pmc_refupdate.c @@ -1,5 +1,7 @@ #include #include "structdefs.h" +#include "bambooalign.h" +#include "runtime_arch.h" #include "pmc_forward.h" #include "pmc_refupdate.h" @@ -80,14 +82,14 @@ void pmc_compact(struct pmc_region * region, int forward, void *bottomptr, void tmpptr+=size; } } else { - struct ___Object___ *backward=region->lastobj; + struct ___Object___ *backward=((struct ___Object___ *) region)->backward; struct ___Object___ *lastobj=NULL; while(backward) { lastobj=backward; - backward=backward->lastobj; + backward=backward->backward; unsigned int type; unsigned int size; - gettype_size(tmpptr, &type, &size); + gettype_size(lastobj, &type, &size); void *forwardptr=(void *)((struct ___Object___ *) lastobj)->marked; ((struct ___Object___ *) lastobj)->marked=NULL; if (forwardptr) {