#ifdef STM
#include "stmlookup.h"
#endif
+#ifdef JNI
+#include "jni-private.h"
+#endif
+
+#define NUMPTRS 100
+
+struct pointerblock {
+ void * ptrs[NUMPTRS];
+ struct pointerblock *next;
+};
-struct garbagelist {
+//Need to check if pointers are transaction pointers
+//this also catches the special flag value of 1 for local copies
+#ifdef DSTM
+#define ENQUEUE(orig, dst) \
+ if ((!(((unsigned int)orig)&0x1))) { \
+ if (orig>=curr_heapbase&&orig<curr_heaptop) { \
+ void *copy; \
+ if (gc_createcopy(orig,©)) \
+ enqueue(copy); \
+ dst=copy; \
+ } \
+ }
+#elif defined(STM)
+#define ENQUEUE(orig, dst) \
+ if (orig>=curr_heapbase&&orig<curr_heaptop) { \
+ void *copy; \
+ if (gc_createcopy(orig,©)) \
+ enqueue(copy); \
+ dst=copy; \
+ }
+#define SENQUEUE(orig, dst) \
+ { \
+ void *copy; \
+ if (gc_createcopy(orig,©)) \
+ enqueue(copy); \
+ dst=copy; \
+ }
+#elif defined(FASTCHECK)
+#define ENQUEUE(orig, dst) \
+ if (((unsigned int)orig)!=1) { \
+ void *copy; \
+ if (gc_createcopy(orig,©)) \
+ enqueue(copy); \
+ dst=copy; }
+#else
+#define ENQUEUE(orig, dst) \
+ if (orig!=NULL) { \
+ void *copy; \
+ if (gc_createcopy(orig,©)) \
+ enqueue(copy); \
+ dst=copy; \
+ }
+#endif
+
+struct garbagelist {
int size;
- struct garbagelist *next;
- void * array[];
+ struct garbagelist *next;
+ void * array[];
};
extern void * curr_heapbase;
struct listitem {
struct listitem * prev;
struct listitem * next;
- struct garbagelist * stackptr;
+ struct garbagelist * stackptr;
#ifdef THREADS
struct lockvector * lvector;
#endif
+#ifdef JNI
+ struct jnireferences ** jnirefs;
+#endif
#ifdef STM
unsigned int tc_size;
cliststruct_t **tc_structs;
#ifdef TASK
void fixtags();
+extern struct pointerblock *taghead;
+extern int tagindex;
#endif
#if defined(THREADS)||defined(DSTM)||defined(STM)||defined(MLP)