#include <stdio.h>
#endif
-#ifndef INTPTR
-#ifdef BIT64
-#define INTPTR long
-#define INTPTRSHIFT 3
-#else
-#define INTPTR int
-#define INTPTRSHIFT 2
-#endif
-#endif
-
-#ifndef INLINE
-#define INLINE inline __attribute__((always_inline))
-#endif // #ifndef INLINE
-
#define GC_SHIFT_BITS 4
/* GCSHARED HASH ********************************************************/
#ifndef GCSHAREDHASH_H
#define GCSHAREDHASH_H
-#ifndef bool
-#define bool int
-#endif
-
-#ifndef true
-#define true 1
-#endif
-
-#ifndef false
-#define false 0
-#endif
-
+#include "multicore.h"
#include "mem.h"
/* GCSharedHash *********************************************************/
#include "dmalloc.h"
#endif
-#ifndef INTPTR
-#ifdef BIT64
-#define INTPTR long
-#define INTPTRSHIFT 3
-#else
-#define INTPTR int
-#define INTPTRSHIFT 2
-#endif
-#endif
-
#define GC_SHIFT_BITS 4
/* mgchash ********************************************************/
#ifndef MGCHASH_H
#define MGCHASH_H
-#ifndef bool
-#define bool int
-#endif
-
-#ifndef true
-#define true 1
-#endif
-
-#ifndef false
-#define false 0
-#endif
-
-#ifndef INLINE
-#define INLINE inline __attribute__((always_inline))
-#endif
-
+#include "multicore.h"
#include "mem.h"
/* mgchash *********************************************************/
#ifndef bool
#define bool int
+#endif
+
+#ifndef true
#define true 1
+#endif
+
+#ifndef false
#define false 0
#endif
+#ifndef INTPTR
+#ifdef BIT64
+#define INTPTR long
+#define INTPTRSHIFT 3
+#else
+#define INTPTR int
+#define INTPTRSHIFT 2
+#endif
+#endif
+
#endif // MULTICORE
#endif // BAMBOO_MULTICORE_H
#include "multicoreruntime.h"
#include "multicoregcprofile.h"
#include "gcqueue.h"
-#ifdef MGC
-#include "runtime_arch.h"
-
-extern int corenum;
-#endif
#ifdef SMEMM
extern unsigned int gcmem_mixed_threshold;
#include "runtime_arch.h"
#include "multicoreruntime.h"
-extern int corenum;
-
INLINE bool gc_checkCoreStatus() {
BAMBOO_ENTER_RUNTIME_MODE_FROM_CLIENT();
for(int i = 0; i < NUMCORES4GC; ++i) {
#include "ObjectHash.h"
#include "GenericHashtable.h"
#include "gcqueue.h"
-#ifdef MGC
-#include "runtime_arch.h"
-
-extern int corenum;
-#endif
/* Task specific includes */
#include "multicoreruntime.h"
#include "GenericHashtable.h"
#include "gcqueue.h"
-#ifdef MGC
-#include "runtime_arch.h"
-
-extern int corenum;
-#endif
-extern int corenum;
#ifdef TASK
extern struct parameterwrapper ** objectqueues[][NUMCLASSES];
extern int numqueues[][NUMCLASSES];
#include "structdefs.h"
#include "mem.h"
-extern int corenum;
-
INLINE void initmulticoregcprofiledata() {
if(STARTUPCORE == BAMBOO_NUM_OF_CORE) {
// startup core to initialize corestatus[]
#include "runtime_arch.h"
#include "multicoreruntime.h"
-extern int corenum;
-
#ifdef MULTICORE_GC
#include "multicorehelper.h"
#ifndef BAMBOO_MULTICORE_MGC_H
#define BAMBOO_MULTICORE_MGC_H
#ifdef MGC
+#include "runtime_arch.h"
// shared memory pointer for global thread queue
// In MGC version, this block of memory is located at the very bottom of the
// shared memory with the base address as BAMBOO_BASE_VA.
unsigned int * bamboo_thread_queue;
unsigned int bamboo_max_thread_num_mask;
unsigned int bamboo_current_thread;
-
-//extern int corenum;
#endif // MGC
#endif // BAMBOO_MULTICORE_MGC_H
#include "multicoreruntime.h"
#include "multicoretaskprofile.h"
#include "gcqueue.h"
-#ifdef MGC
-#include "structdefs.h"
-#include "runtime_arch.h"
-
-extern int corenum;
-#endif
int msgsizearray[] = {
0, //MSGSTART,
#include "runtime.h"
#include "multicoreruntime.h"
#include "methodheaders.h"
-#ifdef MGC
-#include "runtime_arch.h"
-#endif
extern int classsize[];
extern int typearray[];
extern struct genhashtable * activetasks;
#endif
-int debugtask=0;
#ifdef MGC
int corenum = 0;
#endif
#include "multicoreruntime.h"
#include "multicoretaskprofile.h"
#include "multicoretask.h"
-
-#ifndef INLINE
-#define INLINE inline __attribute__((always_inline))
-#endif
+#include "multicore.h"
// data structures for task invocation
struct genhashtable * activetasks;