#include "multicoreruntime.h"
#include "ObjectHash.h"
#include "GenericHashtable.h"
+#include "gcqueue.h"
+#ifdef MGC
+#include "runtime_arch.h"
+
+extern int corenum;
+#endif
/* Task specific includes */
}
// flush cached objs to be transferred
- for(struct QueueItem * item = getHead(totransobjqueue);item != NULL;item = getNextQueueItem(item);) {
+ for(struct QueueItem * item = getHead(totransobjqueue);item != NULL;item = getNextQueueItem(item)) {
struct transObjInfo * totransobj = (struct transObjInfo *)(item->objectptr);
// the obj can not be NULL
FLUSHOBJNONNULL(totransobj->objptr, 0);
BAMBOO_CACHE_MF();
flushRuntimeObj(stackptr);
- while(true) {
- BAMBOO_ENTER_RUNTIME_MODE_FROM_CLIENT();
- if(!gc_moreItems_I()) {
- BAMBOO_ENTER_CLIENT_MODE_FROM_RUNTIME();
- break;
- }
-
- unsigned int ptr = gc_dequeue_I();
- BAMBOO_ENTER_CLIENT_MODE_FROM_RUNTIME();
+ while(gc_moreItems()) {
+ unsigned int ptr = gc_dequeue();
// should be a local shared obj and should have mapping info
FLUSHOBJNONNULL(ptr, 0);
- BAMBOO_ASSERT(ptr != NULL, 0xb02a);
+ BAMBOO_ASSERT(ptr != NULL);
if(((struct ___Object___ *)ptr)->marked == COMPACTED) {
flushPtrsInObj((void *)ptr);
while(gc_lobjmoreItems_I()) {
unsigned int ptr = gc_lobjdequeue_I(NULL, NULL);
FLUSHOBJ(ptr, 0);
- BAMBOO_ASSERT(ptr!=NULL, 0xb02d);
+ BAMBOO_ASSERT(ptr!=NULL);
if(((struct ___Object___ *)ptr)->marked == COMPACTED) {
flushPtrsInObj((void *)ptr);
if(STARTUPCORE == BAMBOO_NUM_OF_CORE) {
gccorestatus[BAMBOO_NUM_OF_CORE] = 0;
} else {
- send_msg_2(STARTUPCORE, GCFINISHFLUSH, BAMBOO_NUM_OF_CORE, false);
+ send_msg_2(STARTUPCORE,GCFINISHFLUSH,BAMBOO_NUM_OF_CORE);
}
}