From: adash Date: Thu, 26 May 2011 17:59:01 +0000 (+0000) Subject: some changes to allow running >1 thread per machine X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c18513a16b6d64dc1924b4a4028e5f3c7e3a1150;p=IRC.git some changes to allow running >1 thread per machine --- diff --git a/Robust/src/Runtime/DSTM/interface_recovery/objstr.c b/Robust/src/Runtime/DSTM/interface_recovery/objstr.c index be04a8d6..11d484c5 100644 --- a/Robust/src/Runtime/DSTM/interface_recovery/objstr.c +++ b/Robust/src/Runtime/DSTM/interface_recovery/objstr.c @@ -47,7 +47,11 @@ void *objstrAlloc(objstr_t **osptr, unsigned int size) { { unsigned int newsize=size>DEFAULT_OBJ_STORE_SIZE?size:DEFAULT_OBJ_STORE_SIZE; - objstr_t *os=(objstr_t *)calloc(1,(sizeof(objstr_t) + newsize)); + objstr_t *os; + if((os =(objstr_t *)calloc(1,(sizeof(objstr_t) + newsize))) == NULL) { + printf("%s() Calloc error at line %d, %s\n", __func__, __LINE__, __FILE__); + return NULL; + } void *ptr=&os[1]; os->next=*osptr; (*osptr)=os; diff --git a/Robust/src/Runtime/DSTM/interface_recovery/trans.c b/Robust/src/Runtime/DSTM/interface_recovery/trans.c index 1055fa8f..e5725028 100644 --- a/Robust/src/Runtime/DSTM/interface_recovery/trans.c +++ b/Robust/src/Runtime/DSTM/interface_recovery/trans.c @@ -88,8 +88,6 @@ int sendRemoteReq = 0; int getResponse = 0; #ifdef RECOVERY - - #define INCREASE_EPOCH(x,y,z) ((x/y+1)*y + z) /*********************************** * Global variables for Duplication @@ -122,8 +120,6 @@ unsigned int currentBackupMachine; int numRecovery = 0; recovery_stat_t* recoverStat; #endif - - #endif void printhex(unsigned char *, int); @@ -2757,7 +2753,7 @@ void *transPrefetch(void *t) { /* Send Prefetch Request */ prefetchpile_t *ptr = pilehead; while(ptr != NULL) { - int sd = getSock2(transPrefetchSockPool, ptr->mid); + int sd = getSockWithLock(transPrefetchSockPool, ptr->mid); sendPrefetchReq(ptr, sd); ptr = ptr->next; }