4 #include "methodheaders.h"
6 __thread int transaction_check_counter;
7 __thread jmp_buf aborttrans;
8 __thread int abortenabled;
9 __thread int * counter_reset_pointer;
11 #include "delaycomp.h"
15 if (abortenabled&&checktrans()) {
16 printf("Loop Abort\n");
17 transaction_check_counter=(*counter_reset_pointer=HIGH_CHECK_FREQUENCY);
36 _longjmp(aborttrans, 1);
38 transaction_check_counter=*counter_reset_pointer;
41 #ifdef D___System______Assert____Z
42 CALL11(___System______Assert____Z, int ___status___, int ___status___) {
44 if (abortenabled&&checktrans()) {
63 _longjmp(aborttrans, 1);
65 printf("Assertion violation\n");
66 *((int *)(NULL)); //force stack trace error
72 void errorhandler(int sig, struct sigcontext ctx) {
74 if (abortenabled&&checktrans()) {
76 sigemptyset(&toclear);
77 sigaddset(&toclear, sig);
78 sigprocmask(SIG_UNBLOCK, &toclear,NULL);
97 _longjmp(aborttrans, 1);
99 threadhandler(sig, ctx);
103 /* Create info to keep track of objects that can be locked */
104 chashlistnode_t *curr = c_list;
106 /* Inner loop to traverse the linked list of the cache lookupTable */
107 while(likely(curr != NULL)) {
108 //if the first bin in hash table is empty
109 objheader_t * headeraddr=&((objheader_t *) curr->val)[-1];
110 objheader_t *header=(objheader_t *)(((char *)curr->key)-sizeof(objheader_t));
111 unsigned int version = headeraddr->version;
113 if (header->lock==0) {
117 if (version!=header->version) {