#endif
while(1) {
if (VAR(___this___)->tid==0) {
- VAR(___this___)->___Object______prevlockobject___=NULL;
- VAR(___this___)->___Object______nextlockobject___=(struct ___Object___ *)pthread_getspecific(threadlocks);
- if (VAR(___this___)->___Object______nextlockobject___!=NULL)
- VAR(___this___)->___Object______nextlockobject___->___Object______prevlockobject___=VAR(___this___);
+ VAR(___this___)->___prevlockobject___=NULL;
+ VAR(___this___)->___nextlockobject___=(struct ___Object___ *)pthread_getspecific(threadlocks);
+ if (VAR(___this___)->___nextlockobject___!=NULL)
+ VAR(___this___)->___nextlockobject___->___prevlockobject___=VAR(___this___);
pthread_setspecific(threadlocks, VAR(___this___));
VAR(___this___)->lockcount=1;
VAR(___this___)->tid=self;
if (self==VAR(___this___)->tid) {
VAR(___this___)->lockcount--;
if (VAR(___this___)->lockcount==0) {
- if (VAR(___this___)->___Object______prevlockobject___==NULL) {
- pthread_setspecific(threadlocks, VAR(___this___)->___Object______nextlockobject___);
+ if (VAR(___this___)->___prevlockobject___==NULL) {
+ pthread_setspecific(threadlocks, VAR(___this___)->___nextlockobject___);
} else
- VAR(___this___)->___Object______prevlockobject___->___Object______nextlockobject___=VAR(___this___)->___Object______nextlockobject___;
- if (VAR(___this___)->___Object______nextlockobject___!=NULL)
- VAR(___this___)->___Object______nextlockobject___->___Object______prevlockobject___=VAR(___this___)->___Object______prevlockobject___;
+ VAR(___this___)->___prevlockobject___->___nextlockobject___=VAR(___this___)->___nextlockobject___;
+ if (VAR(___this___)->___nextlockobject___!=NULL)
+ VAR(___this___)->___nextlockobject___->___prevlockobject___=VAR(___this___)->___prevlockobject___;
VAR(___this___)->lockentry=NULL;
VAR(___this___)->tid=0;
}
#ifdef THREADS
struct ___Object___ *ll=pthread_getspecific(threadlocks);
while(ll!=NULL) {
- struct ___Object___ *llnext=ll->___Object______nextlockobject___;
- ll->___Object______nextlockobject___=NULL;
- ll->___Object______prevlockobject___=NULL;
+ struct ___Object___ *llnext=ll->___nextlockobject___;
+ ll->___nextlockobject___=NULL;
+ ll->___prevlockobject___=NULL;
ll->lockcount=0;
ll->tid=0; //unlock it
ll=llnext;
#else
___Thread______staticStart____L___Thread___(___this___);
#endif
- ___this___->___Thread______finished___=1;
+ ___this___->___finished___=1;
pthread_mutex_lock(&joinlock);
pthread_cond_signal(&joincond);
pthread_mutex_unlock(&joinlock);
#if defined(THREADS)||defined(STM)
void CALL01(___Thread______nativeJoin____, struct ___Thread___ * ___this___) {
pthread_mutex_lock(&joinlock);
- while(!VAR(___this___)->___Thread______finished___) {
+ while(!VAR(___this___)->___finished___) {
#ifdef PRECISE_GC
stopforgc((struct garbagelist *)___params___);
#endif