#include "dstm.h"
#endif
+#ifndef INTPTR
+#ifdef BIT64
+#define INTPTR long
+#else
+#define INTPTR int
+#endif
+#endif
+
extern void * curr_heapbase;
extern void * curr_heaptop;
#endif
#ifdef DSTM
-void * allocate_newglobal(transrecord_t *, int type);
-struct ArrayObject * allocate_newarrayglobal(transrecord_t *, int type, int length);
+__attribute__((malloc)) void * allocate_newglobal(int type);
+__attribute__((malloc)) struct ArrayObject * allocate_newarrayglobal(int type, int length);
+#endif
+
+#ifdef STM
+__attribute__((malloc)) void * allocate_newtrans(void * ptr, int type);
+__attribute__((malloc)) struct ArrayObject * allocate_newarraytrans(void * ptr, int type, int length);
#endif
#ifdef PRECISE_GC
#include "garbage.h"
-void * allocate_new(void *, int type);
-struct ArrayObject * allocate_newarray(void *, int type, int length);
-struct ___String___ * NewString(void *, const char *str,int length);
-struct ___TagDescriptor___ * allocate_tag(void *ptr, int index);
+__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
-void * allocate_new(int type);
-struct ArrayObject * allocate_newarray(int type, int length);
-struct ___String___ * NewString(const char *str,int length);
-struct ___TagDescriptor___ * allocate_tag(int index);
+__attribute__((malloc)) void * allocate_new(int type);
+__attribute__((malloc)) struct ArrayObject * allocate_newarray(int type, int length);
+__attribute__((malloc)) struct ___String___ * NewString(const char *str,int length);
+__attribute__((malloc)) struct ___TagDescriptor___ * allocate_tag(int index);
#endif
int * queues;
int length;
};
+#ifdef RAW
+struct RuntimeHash * lockRedirectTbl;
+#endif
+#endif
+
+#ifdef FASTCHECK
+extern struct ___Object___ * ___fcrevert___;
#endif
#ifdef MULTICORE
void enqueueObject(void * ptr, struct parameterwrapper ** queues, int length);
#ifdef RAW
void enqueueObject_I(void * ptr, struct parameterwrapper ** queues, int length);
+#ifdef RAWPROFILE
+inline void setTaskExitIndex(int index);
+inline void addNewObjInfo(void * nobj);
+#endif
#endif
+int * getAliasLock(void ** ptrs, int length, struct RuntimeHash * tbl);
void addAliasLock(void * ptr, int lock);
#else
void flagorand(void * ptr, int ormask, int andmask);