extern int failurecount;
#endif
#ifdef DSTM
-#include "dstm.h"
+#ifdef RECOVERY
+#include "DSTM/interface_recovery/dstm.h"
+#else
+#include "DSTM/interface/dstm.h"
+#endif
#endif
#ifndef INTPTR
extern void * curr_heapbase;
extern void * curr_heaptop;
+#define likely(x) __builtin_expect((x),1)
+#define unlikely(x) __builtin_expect((x),0)
+
+
#define TAGARRAYINTERVAL 10
#define OBJECTARRAYINTERVAL 10
__attribute__((malloc)) struct ArrayObject * allocate_newarray(void *, int type, int length);
__attribute__((malloc)) struct ___String___ * NewString(void *, const char *str,int length);
__attribute__((malloc)) struct ___TagDescriptor___ * allocate_tag(void *ptr, int index);
+#elif defined MULTICORE_GC
+__attribute__((malloc)) void * allocate_new(void *, int type);
+__attribute__((malloc)) struct ArrayObject * allocate_newarray(void *, int type, int length);
+__attribute__((malloc)) struct ___String___ * NewString(void *, const char *str,int length);
+__attribute__((malloc)) struct ___TagDescriptor___ * allocate_tag(void *ptr, int index);
#else
__attribute__((malloc)) void * allocate_new(int type);
__attribute__((malloc)) struct ArrayObject * allocate_newarray(int type, int length);
int * queues;
int length;
};
-struct RuntimeHash * lockRedirectTbl;
#endif
#ifdef FASTCHECK
#ifdef MULTICORE
inline void run(void * arg);
+#ifdef MULTICORE_GC
+inline void setupsmemmode(void);
+#endif
int receiveObject(void);
void flagorand(void * ptr, int ormask, int andmask, struct parameterwrapper ** queues, int length);
void flagorandinit(void * ptr, int ormask, int andmask);
-void enqueueObject(void * ptr, struct parameterwrapper ** queues, int length);
+void enqueueObject(void * ptr, struct parameterwrapper ** queues,int length);
#ifdef PROFILE
inline void setTaskExitIndex(int index);
inline void addNewObjInfo(void * nobj);
#endif
int * getAliasLock(void ** ptrs, int length, struct RuntimeHash * tbl);
void addAliasLock(void * ptr, int lock);
+void * smemalloc(int coren, int size, int * allocsize);
#else
void flagorand(void * ptr, int ormask, int andmask);
void flagorandinit(void * ptr, int ormask, int andmask);