#ifndef MAC
litem.stackptr=ptr;
#if defined(STM)||defined(THREADS)||defined(MLP)
-#ifdef MAC
- litem.base=pthread_getspecific(memorybasekey);
-#else
litem.base=&memorybase;
#endif
-#endif
#ifdef STM
litem.tc_size=c_size;
litem.tc_table=&c_table;
//handle MAC
struct listitem *litem=pthread_getspecific(litemkey);
litem->stackptr=ptr;
+#if defined(STM)||defined(THREADS)||defined(MLP)
+ litem->base=pthread_getspecific(memorybasekey);
+#endif
#endif
pthread_mutex_lock(&gclistlock);
listcount++;
}
char *retvalue=memorybase;
memorybase+=size;
+#ifdef MAC
+ *(char **)pthread_getspecific(memorybasekey)=memorybase;
+ *(char **)pthread_getspecific(memorytopkey)=memorytop;
+#endif
return retvalue;
}
pthread_key_create(&threadlocks, NULL);
pthread_key_create(&memorybasekey, NULL);
pthread_key_create(&memorytopkey, NULL);
+ pthread_key_create(&litemkey, NULL);
#endif
processOptions();
initializeexithandler();