From: jihoonl Date: Wed, 7 Oct 2009 19:22:07 +0000 (+0000) Subject: recovery flag added X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7b2f15720581402d74cfd3e142a1b85537876bf1;p=IRC.git recovery flag added --- diff --git a/Robust/src/Runtime/thread.c b/Robust/src/Runtime/thread.c index 24164e4d..485271f2 100644 --- a/Robust/src/Runtime/thread.c +++ b/Robust/src/Runtime/thread.c @@ -202,9 +202,7 @@ void initializethreads() { { int i; for(i=0; i___mid___) == 0) { + printf("Thread oid = %x is dead\n", (unsigned int) VAR(___this___)); + transAbort(); + return; + } +#endif + else { version = (ptr-1)->version; if((oidarray = calloc(1, sizeof(unsigned int))) == NULL) { printf("Calloc error %s, %d\n", __FILE__, __LINE__); @@ -360,7 +377,12 @@ transstart: #ifdef PRECISE_GC stopforgc((struct garbagelist *)___params___); #endif + +#ifdef RECOVERY + reqNotify(oidarray, versionarray, 1,p->___mid___); +#else reqNotify(oidarray, versionarray, 1); +#endif #ifdef PRECISE_GC restartaftergc(); #endif @@ -498,6 +520,7 @@ void startDSMthread(int oid, int objType) { ptr[0]=oid; ptr[1]=objType; pthread_key_create(&oidval, globalDestructor); + do { retval=pthread_create(&thread, &nattr, (void * (*)(void *)) &initDSMthread, ptr); if (retval!=0)