From: bdemsky Date: Sat, 27 Jun 2009 23:31:44 +0000 (+0000) Subject: make runtime 64 bit clean again X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6b6d29c0825355275db93c12a0759e451b41bc4a;p=IRC.git make runtime 64 bit clean again --- diff --git a/Robust/src/Runtime/STM/delaycomp.h b/Robust/src/Runtime/STM/delaycomp.h index 88fc96fa..5835ccdf 100644 --- a/Robust/src/Runtime/STM/delaycomp.h +++ b/Robust/src/Runtime/STM/delaycomp.h @@ -5,8 +5,8 @@ //them for now..probably a real implementation would page protect the //page after...then default to something simpler -#define MAXPOINTERS 1024*1024*4 -#define MAXVALUES 1024*1024*4 +#define MAXPOINTERS 1024*1024*1 +#define MAXVALUES 1024*1024*1 struct pointerlist { int count; diff --git a/Robust/src/Runtime/STM/stm.c b/Robust/src/Runtime/STM/stm.c index 4e502c7e..b69739a0 100644 --- a/Robust/src/Runtime/STM/stm.c +++ b/Robust/src/Runtime/STM/stm.c @@ -266,7 +266,7 @@ __attribute__((pure)) void *transRead(void * oid, void *gl) { A_memcpy(objcopy, header, size); /* Insert into cache's lookup table */ STATUS(objcopy)=0; - if (((unsigned int)oid)<((unsigned int ) curr_heapbase)|| ((unsigned int)oid) >((unsigned int) curr_heapptr)) + if (((unsigned INTPTR)oid)<((unsigned INTPTR ) curr_heapbase)|| ((unsigned INTPTR)oid) >((unsigned INTPTR) curr_heapptr)) printf("ERROR! Bad object address!\n"); t_chashInsert(oid, &objcopy[1]); return &objcopy[1]; diff --git a/Robust/src/Runtime/thread.c b/Robust/src/Runtime/thread.c index 8582a016..0180ef57 100644 --- a/Robust/src/Runtime/thread.c +++ b/Robust/src/Runtime/thread.c @@ -125,7 +125,12 @@ void threadhandler(int sig, struct sigcontext ctx) { printf("signal\n"); printf("To get stack trace, set breakpoint in threadhandler in gdb\n"); nptrs = backtrace(buffer, 100); +#ifdef BIT64 + buffer[1]=(void *)ctx.rip; +#else buffer[1]=(void *)ctx.eip; +#endif + strings = backtrace_symbols(buffer, nptrs); if (strings == NULL) { perror("backtrace_symbols"); @@ -381,7 +386,9 @@ void CALL01(___Thread______nativeCreate____, struct ___Thread___ * ___this___) { pthread_mutex_unlock(&gclistlock); pthread_attr_init(&nattr); pthread_attr_setdetachstate(&nattr, PTHREAD_CREATE_DETACHED); - + INTPTR stacksize; + pthread_attr_getstacksize(&nattr, &stacksize); + printf("STACKSIZE=%u\n",stacksize); do { retval=pthread_create(&thread, &nattr, (void * (*)(void *)) &initthread, VAR(___this___)); if (retval!=0)