assert(nodemd.getModifiers().isNative());
MethodDescriptor runmd=null;
- for(Iterator methodit=nodemd.getClassDesc().getMethodTable().getSet("run").iterator(); methodit.hasNext();) {
+ for(Iterator methodit=nodemd.getClassDesc().getMethodTable().getSet("staticStart").iterator(); methodit.hasNext();) {
MethodDescriptor md=(MethodDescriptor) methodit.next();
- if (md.numParameters()!=0||md.getModifiers().isStatic())
+ if (md.numParameters()!=1||!md.getModifiers().isStatic()||!md.getParamType(0).getSymbol().equals(TypeUtil.ThreadClass))
continue;
runmd=md;
break;
return tmp;
}
+//free entire list, starting at store
+void objstrDelete(objstr_t *store) {
+ objstr_t *tmp;
+ while (store != NULL) {
+ tmp = store->next;
+ free(store);
+ store = tmp;
+ }
+ return;
+}
+
/* =================================================
* transStart
* This function initializes things required in the
*
* =================================
*/
-int transCommmitProcess(unsigned int *oidcreated, int *numoidcreated, unsigned int *oidrdlocked, int *numoidrdlocked,
+int transCommitProcess(unsigned int *oidcreated, int *numoidcreated, unsigned int *oidrdlocked, int *numoidrdlocked,
unsigned int *oidwrlocked, int *numoidwrlocked) {
objheader_t *header, *tcptr;
void *ptrcreate;
}
header->version += 1;
- if(header->notifylist != NULL) {
- notifyAll(&header->notifylist, OID(header), header->version);
- }
}
/* Release read locks */
* ================================
*/
int stmStartup();
+void objstrDelete(objstr_t *store);
objstr_t *objstrCreate(unsigned int size);
void transStart();
objheader_t *transCreateObj(unsigned int size);
return ptr;
}
-#if defined(THREADS)||defined(DSTM)
+#if defined(THREADS)||defined(DSTM)||defined(STM)
void checkcollect(void * ptr) {
struct listitem * tmp=stopforgc((struct garbagelist *)ptr);
pthread_mutex_lock(&gclock); // Wait for GC
void initthread(struct ___Thread___ * ___this___) {
#ifdef PRECISE_GC
int p[]={1, (int) NULL, (int) ___this___};
+#ifdef THREADS
___Thread______staticStart____L___Thread___((struct ___Thread______staticStart____L___Thread____params *)p);
+#else
+ ___Thread____NN____staticStart____L___Thread___((struct ___Thread____NN____staticStart____L___Thread____params *)p);
+#endif
___this___=(struct ___Thread___ *) p[2];
#else
___Thread______staticStart____L___Thread___(___this___);
extern pthread_mutex_t objlock;
extern pthread_cond_t objcond;
extern pthread_key_t threadlocks;
-#ifdef THREADS
+#if defined(THREADS)||defined(STM)
void initthread(struct ___Thread___ * ___this___);
#endif
#ifdef DSTM
if $SINGLETM
then
EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -I$DSMRUNTIME"
-FILES="$FILES $DSMRUNTIME/dsmlock.c $DSMRUNTIME/singleTMCommit.c $DSMRUNTIME/clookup.c"
+FILES="$FILES $DSMRUNTIME/dsmlock.c $DSMRUNTIME/singleTMCommit.c $DSMRUNTIME/clookup.c $ROBUSTROOT/Runtime/thread.c"
fi
if $ABORTREADERS