//page after...then default to something simpler
#define MAXPOINTERS 1024*1024*1
-#define MAXVALUES 1024*1024*1
+#define MAXVALUES 1024*1024*2
+#define MAXBRANCHES 1024*1024*4
struct pointerlist {
int count;
int array[MAXVALUES];
};
+struct branchlist {
+ int count;
+ char array[MAXBRANCHES];
+};
+
extern __thread struct pointerlist ptrstack;
extern __thread struct primitivelist primstack;
+extern __thread struct branchlist branchstack;
//Pointers
//Branches
-#define RESTOREANDBRANCH(loc) if (primstack.array[primstack.count++]) goto loc
+#define RESTOREANDBRANCH(loc) if (branchstack.array[branchstack.count++]) goto loc
-#define STOREANDBRANCH(cond, loc) if (primstack.array[primstack.count++]=cond) goto loc
+#define STOREANDBRANCH(cond, loc) if (branchstack.array[branchstack.count++]=cond) goto loc
//Integers
#include "delaycomp.h"
__thread struct pointerlist ptrstack;
__thread struct primitivelist primstack;
+__thread struct branchlist branchstack;
+struct pointerlist *c_ptrstack;
+struct primitivelist *c_primstack;
+struct branchlist *c_branchstack;
#endif
#ifdef TRANSSTATS
*/
void transStart() {
//Transaction start is currently free...commit and aborting is not
+#ifdef DELAYCOMP
+ c_ptrstack=&ptrstack;
+ c_primstack=&primstack;
+ c_branchstack=&branchstack;
+#endif
}
/* =======================================================
* -copies the object into the transaction cache
* =============================================================
*/
-__attribute__((pure)) void *transRead(void * oid, void *gl) {
+__attribute__ ((pure)) void *transRead(void * oid, void *gl) {
objheader_t *tmp, *objheader;
objheader_t *objcopy;
int size;
dc_t_chashreset();
ptrstack.count=0;
primstack.count=0;
+ branchstack.count=0;
#endif
return TRANS_ABORT;
}
dc_t_chashreset();
ptrstack.count=0;
primstack.count=0;
+ branchstack.count=0;
#endif
return 0;
}
dc_t_chashreset();
ptrstack.count=0;
primstack.count=0;
+ branchstack.count=0;
#endif
return TRANS_ABORT;
}
// call commit method
ptrstack.count=0;
primstack.count=0;
+ branchstack.count=0;
commitmethod(params, locals, primitives);
#endif