Code clean
authorjzhou <jzhou>
Tue, 10 May 2011 22:47:45 +0000 (22:47 +0000)
committerjzhou <jzhou>
Tue, 10 May 2011 22:47:45 +0000 (22:47 +0000)
15 files changed:
Robust/src/Runtime/bamboo/GCSharedHash.c
Robust/src/Runtime/bamboo/GCSharedHash.h
Robust/src/Runtime/bamboo/MGCHash.c
Robust/src/Runtime/bamboo/MGCHash.h
Robust/src/Runtime/bamboo/multicore.h
Robust/src/Runtime/bamboo/multicoregarbage.c
Robust/src/Runtime/bamboo/multicoregccompact.c
Robust/src/Runtime/bamboo/multicoregcflush.c
Robust/src/Runtime/bamboo/multicoregcmark.c
Robust/src/Runtime/bamboo/multicoregcprofile.c
Robust/src/Runtime/bamboo/multicoremem.c
Robust/src/Runtime/bamboo/multicoremgc.h
Robust/src/Runtime/bamboo/multicoremsg.c
Robust/src/Runtime/bamboo/multicoreruntime.c
Robust/src/Runtime/bamboo/multicoretask.c

index 945a6ec2a481b090fcadfc72c905506903bbb0fb..c2e5340922d40c5cea2deb644979069277ce0332 100755 (executable)
@@ -7,20 +7,6 @@
 #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 ********************************************************/
index bfcd6204d083cef21b2d2c74c7afcbdeb0285b69..6d0fe4708804210443672c03d1cea0c69dff1665 100755 (executable)
@@ -3,18 +3,7 @@
 #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 *********************************************************/
index f85a1adee63907e78a60bbdd9825a938b253b55c..598162b7f5869f0cfd85cb1a66845c301e9260d3 100644 (file)
@@ -8,16 +8,6 @@
 #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 ********************************************************/
index 65a03ec3cc51c9ddd8bb1bd5b81cc4bd435c6808..cf2c24ddde535863822b5d4294b1c2263e460bad 100644 (file)
@@ -1,22 +1,7 @@
 #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 *********************************************************/
index 04a61915c5dec5526b32a924226935815989dda5..6d991b18d648ed1c97b1de316d0c13d7e0dcd56e 100644 (file)
@@ -8,9 +8,25 @@
 
 #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
index 6fbbc6d2ee5d00f17ab5b8f95e61d2c35af3e28c..8a42ae66ccc4593e650c1f46e08253f67438cf1f 100644 (file)
@@ -9,11 +9,6 @@
 #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;
index d3abf117e04d83040da3a4838680ba3722e93207..b6cdf3d0cc4b7cec424b8f80580114ef4c49de8b 100644 (file)
@@ -3,8 +3,6 @@
 #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) {
index d2578ecfa63b85dbe54702b3d748f99e9e11e5fe..8a5e96d3bda3f19a989426435c951dbc2b51aa59 100644 (file)
@@ -4,11 +4,6 @@
 #include "ObjectHash.h"
 #include "GenericHashtable.h"
 #include "gcqueue.h"
-#ifdef MGC
-#include "runtime_arch.h"
-
-extern int corenum;
-#endif
 
 /* Task specific includes */
 
index 08f69d5aa20fd2ca1d0d623b53c52ea33ba1230c..419eb0ec70c92ac56f117573af1a4dae171681a0 100644 (file)
@@ -4,13 +4,7 @@
 #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];
index 6391199020b4dba705404651bbfdf58e6329d208..72d7f152e9b749c59e6067120030eaa4744da2fe 100644 (file)
@@ -5,8 +5,6 @@
 #include "structdefs.h"
 #include "mem.h"
 
-extern int corenum;
-
 INLINE void initmulticoregcprofiledata() {
   if(STARTUPCORE == BAMBOO_NUM_OF_CORE) {
     // startup core to initialize corestatus[]
index d65a70be79023dbf1e75320f8ba505695fbaf760..44e373d55a8f6aae5afcf3d3648de94740ccef62 100644 (file)
@@ -2,8 +2,6 @@
 #include "runtime_arch.h"
 #include "multicoreruntime.h"
 
-extern int corenum;
-
 #ifdef MULTICORE_GC
 #include "multicorehelper.h"
 
index d0410207cd3f9bbfe622e0af6599c5bc6f6d5000..a783596d5ee115e3f0e5b49b6720d90126553ad4 100644 (file)
@@ -1,6 +1,7 @@
 #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.
@@ -16,7 +17,5 @@
 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
index 5a783fed2f8d0c77cae0f3b1f9e8671825cef752..9df331c3f1460aea626852642559d37c849e703b 100644 (file)
@@ -4,12 +4,6 @@
 #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,
index 86a33bfbef3717202da2557f98eb1b304b3ec3d8..ad40a02ba89656fcb9a3a8db8f965f403e943c35 100644 (file)
@@ -3,9 +3,6 @@
 #include "runtime.h"
 #include "multicoreruntime.h"
 #include "methodheaders.h"
-#ifdef MGC
-#include "runtime_arch.h"
-#endif
 
 extern int classsize[];
 extern int typearray[];
@@ -16,7 +13,6 @@ extern int* supertypes[];
 extern struct genhashtable * activetasks;
 #endif
 
-int debugtask=0;
 #ifdef MGC
 int corenum = 0;
 #endif
index 5c922fd8d8fd4edf58dff46af9483ea890a012fb..77e89921016c007fc0a4a55291b146f586e85c15 100644 (file)
@@ -3,10 +3,7 @@
 #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;