if (isglobal.length!=lb.isglobal.length)
return false;
for(int i=0; i<isglobal.length; i++)
- if (!isglobal[i].equals(lb.isglobal[i]))
+ if (!equiv(isglobal[i],lb.isglobal[i]))
return false;
- if (isglobalthis==null) {
- if (lb.isglobalthis!=null)
- return false;
- } else
- if (!isglobalthis.equals(lb.isglobalthis))
+ if (!equiv(isglobalthis, lb.isglobalthis))
return false;
return (isatomic==lb.isatomic);
}
boolean srcptr=fsfn.getSrc().getType().isPtr();
String src=generateTemp(fm,fsfn.getSrc(),lb);
String dst=generateTemp(fm,fsfn.getDst(),lb);
- if (srcptr) {
+ if (srcptr&&!fsfn.getSrc().getType().isNull()) {
output.println("{");
output.println("int srcoid=("+src+"!=NULL?((int)"+src+"->"+oidstr+"):0);");
}
if (wb.needBarrier(fsfn))
output.println("*((unsigned int *)&("+dst+"->___objstatus___))|=DIRTY;");
- if (srcptr) {
+ if (srcptr&!fsfn.getSrc().getType().isNull()) {
output.println("*((unsigned int *)&("+dst+"->"+ fsfn.getField().getSafeSymbol()+"))=srcoid;");
output.println("}");
} else {
//Transaction set element case
if (wb.needBarrier(fsen))
output.println("*((unsigned int *)&("+generateTemp(fm,fsen.getDst(),lb)+"->___objstatus___))|=DIRTY;");
- if (fsen.getSrc().getType().isPtr()) {
+ if (fsen.getSrc().getType().isPtr()&&!fsen.getSrc().getType().isNull()) {
output.println("{");
String src=generateTemp(fm, fsen.getSrc(), lb);
output.println("int srcoid=("+src+"!=NULL?((int)"+src+"->"+oidstr+"):0);");
}
}
free(ptr);
+ c_table=NULL;
}
ENQUEUE(objptr, *((void **)(((int)ptr)+offset)));
}
}
- }
+ }
next = curr->next;
index = (((unsigned int)key) & mask) >>1;
ENQUEUE(orig, listptr->locklist);
#endif
#ifdef STM
- fixtable(listptr->tc_table, listptr->tc_size);
+ if ((*listptr->tc_table)!=NULL)
+ fixtable(listptr->tc_table, listptr->tc_size);
#endif
stackptr=listptr->stackptr;
listptr=listptr->next;
sin.sin_family= AF_INET;
sin.sin_port=htons(___port___);
sin.sin_addr.s_addr=htonl(*(int *)(((char *)&VAR(___address___)->___length___)+sizeof(int)));
-#if defined(THREADS)||defined(DSTM)
+#if defined(THREADS)||defined(DSTM)||defined(STM)
#ifdef PRECISE_GC
struct listitem *tmp=stopforgc((struct garbagelist *)___params___);
#endif
do {
rc = connect(___fd___, (struct sockaddr *) &sin, sizeof(sin));
} while (rc<0 && errno==EINTR); /* repeat if interrupted */
-#if defined(THREADS)||defined(DSTM)
+#if defined(THREADS)||defined(DSTM)||defined(STM)
#ifdef PRECISE_GC
restartaftergc(tmp);
#endif
unsigned int sinlen=sizeof(sin);
int fd=VAR(___this___)->___fd___;
int newfd;
-#if defined(THREADS)||defined(DSTM)
+#if defined(THREADS)||defined(DSTM)||defined(STM)
#ifdef PRECISE_GC
struct listitem *tmp=stopforgc((struct garbagelist *)___params___);
#endif
newfd=accept(fd, (struct sockaddr *)&sin, &sinlen);
int flag = 1;
setsockopt(newfd, IPPROTO_TCP, TCP_NODELAY, (char *) &flag, sizeof(flag));
-#if defined(THREADS)||defined(DSTM)
+#if defined(THREADS)||defined(DSTM)||defined(STM)
#ifdef PRECISE_GC
restartaftergc(tmp);
#endif
char * charstr=malloc(length);
-#if defined(THREADS)||defined(DSTM)
+#if defined(THREADS)||defined(DSTM)||defined(STM)
#ifdef PRECISE_GC
struct listitem *tmp=stopforgc((struct garbagelist *)___params___);
#endif
do {
byteread=read(fd, charstr, length);
} while(byteread==-1&&errno==EINTR);
-#if defined(THREADS)||defined(DSTM)
+#if defined(THREADS)||defined(DSTM)||defined(STM)
#ifdef PRECISE_GC
restartaftergc(tmp);
#endif