throw new Error("Starting thread on local object not allowed in context:\n"+currlb.getExplanation());
if(thistype.equals(CONFLICT))
throw new Error("Using type that can be either local or global in context:\n"+currlb.getExplanation());
- if(thistype.equals(GLOBAL)&&!isatomic)
+ if(runmethodset==null&&thistype.equals(GLOBAL)&&!isatomic)
throw new Error("Using global object outside of transaction in context:\n"+currlb.getExplanation());
- if (isnative&&thistype.equals(GLOBAL))
+ if (runmethodset==null&&isnative&&thistype.equals(GLOBAL))
throw new Error("Potential call to native method "+md+" on global objects:\n"+currlb.getExplanation());
lb.setGlobalThis(thistype);
}
if(mode==1)
fd=nativeOpen(pathname.getBytes());
}
-
-
+
public FileOutputStream(File path) {
fd=nativeOpen(path.getPath().getBytes());
}
+ public FileOutputStreamOpen(String pathname) {
+ fd = nativeOpen(pathname.getBytes());
+ }
+
private static native int nativeOpen(byte[] filename);
private static native int nativeAppend(byte[] filename);
private static native void nativeWrite(int fd, byte[] array);
public class Thread {
+ public native void start(int mid);
- public void start(int mid) {
- remotethreadstart(mid);
- }
-
- public native static void sleep(long millis);
-
- public void run() {
-
- }
-
- public native void remotethreadstart(int mid);
+ public native static void sleep(long millis);
+
+ public void run() {
+ }
}
<TRANS_COMMIT - control
Server messages:
->OBJECT_FOUND - control, object
+>OBJECT_FOUND - control, sizeof object, object
>OBJECT_NOT_FOUND - control
>OBJECTS_FOUND - control, number of objects, objects
>OBJECTS_NOT_FOUND - control, number of objects, oids
>TRANS_AGREE - control
>TRANS_DISAGREE - control
+>TRANS_AGREE_BUT_MISSING_OBJECTS - control, number of objects, objects
+>TRANS_SOFT_ABORT - control, control bit identifying is missing objects present of not, number of objects, objects
>TRANS_SUCCESSFUL - control
possible conversations (conversation means a tcp connection is maintained throughout):
void transInit();
int processConfigFile();
void addHost(unsigned int);
+void mapObjMethod(unsigned short);
void randomdelay(void);
transrecord_t *transStart();
void *getRemoteObj(transrecord_t *, unsigned int, unsigned int);
int transAbortProcess(void *, unsigned int *, int, int);
int transComProcess(void*, unsigned int *, unsigned int *, unsigned int *, int, int, int);
-void prefetch(int, unsigned int *, short *, short*);
+void prefetch(int, unsigned int *, unsigned short *, short*);
void *transPrefetch(void *);
void *mcqProcess(void *);
void checkPrefetchTuples(prefetchqelem_t *);
tmp->oidcreated[tmp->numcreated] = OID(headeraddr);
tmp->numcreated = tmp->numcreated + 1;
tmp->sum_bytes += sizeof(objheader_t) + classsize[TYPE(headeraddr)];
- } else if (STATUS(headeraddr) & DIRTY) {
+ }else if (STATUS(headeraddr) & DIRTY) {
tmp->oidmod[tmp->nummod] = OID(headeraddr);
tmp->nummod = tmp->nummod + 1;
tmp->sum_bytes += sizeof(objheader_t) + classsize[TYPE(headeraddr)];
pile = ptr;
}
+ /* Clear Flags */
+
STATUS(headeraddr) &= ~(NEW);
STATUS(headeraddr) &= ~(DIRTY);
}
/* This function is a prefetch call generated by the compiler that
* populates the shared primary prefetch queue*/
-void prefetch(int ntuples, unsigned int *oids, short *endoffsets, short *arrayfields) {
+void prefetch(int ntuples, unsigned int *oids, unsigned short *endoffsets, short *arrayfields) {
int qnodesize;
int len = 0;
return -1;
}
#ifdef MAC
- myIpAddr = getMyIpAddr("en1");
+ myIpAddr = getMyIpAddr("en0");
#else
myIpAddr = getMyIpAddr("eth0");
#endif
pthread_attr_destroy(&nattr);
}
#endif
+
+#ifdef DSTM
+void CALL12(___Thread______start____I, int ___mid___, struct ___Thread___ * ___this___, int ___mid___) {
+ startRemoteThread((unsigned int *)VAR(___this___), ___mid___);
+}
+#endif