From 5f508e687d0a52fd936072e00e46690cca38c19d Mon Sep 17 00:00:00 2001 From: bdemsky Date: Sat, 15 Sep 2007 06:11:28 +0000 Subject: [PATCH] OID change --- Robust/src/IR/Flat/BuildCode.java | 2 +- Robust/src/Runtime/DSTM/interface/dstm.h | 3 +++ Robust/src/Runtime/DSTM/interface/trans.c | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Robust/src/IR/Flat/BuildCode.java b/Robust/src/IR/Flat/BuildCode.java index 1474de25..cc9b78fb 100644 --- a/Robust/src/IR/Flat/BuildCode.java +++ b/Robust/src/IR/Flat/BuildCode.java @@ -1422,7 +1422,7 @@ public class BuildCode { output.println(generateTemp(fm, fgcn.getSrc(),lb)+"=(void *)transRead(trans, (unsigned int) "+generateTemp(fm, fgcn.getSrc(),lb)+");"); } else { /* Need to convert to OID */ - output.println(generateTemp(fm, fgcn.getSrc(),lb)+"=(void *)OID("+generateTemp(fm, fgcn.getSrc(),lb)+");"); + output.println(generateTemp(fm, fgcn.getSrc(),lb)+"=(void *)COMPOID("+generateTemp(fm, fgcn.getSrc(),lb)+");"); } } diff --git a/Robust/src/Runtime/DSTM/interface/dstm.h b/Robust/src/Runtime/DSTM/interface/dstm.h index 69408f02..766398b6 100644 --- a/Robust/src/Runtime/DSTM/interface/dstm.h +++ b/Robust/src/Runtime/DSTM/interface/dstm.h @@ -72,6 +72,9 @@ typedef struct objheader { #define OID(x)\ (*((unsigned int *)&((struct ___Object___ *)((unsigned int) x + sizeof(objheader_t)))->___nextobject___)) +#define COMPOID(x)\ + (*((unsigned int *)&((struct ___Object___ *) x)->___nextobject___)) + #define STATUS(x)\ *((unsigned int *) &(((struct ___Object___ *)((unsigned int) x + sizeof(objheader_t)))->___localcopy___)) diff --git a/Robust/src/Runtime/DSTM/interface/trans.c b/Robust/src/Runtime/DSTM/interface/trans.c index ca09e1a0..5a82d24d 100644 --- a/Robust/src/Runtime/DSTM/interface/trans.c +++ b/Robust/src/Runtime/DSTM/interface/trans.c @@ -187,7 +187,7 @@ transrecord_t *transStart() objheader_t *transRead(transrecord_t *record, unsigned int oid) { unsigned int machinenumber; objheader_t *tmp, *objheader; - void *objcopy; + objheader_t *objcopy; int size, rc, found = 0; void *buf; struct timespec ts; -- 2.34.1