3 #include "methodheaders.h"
7 extern int threadcount;
8 extern pthread_mutex_t gclock;
9 extern pthread_mutex_t gclistlock;
10 extern pthread_cond_t gccond;
11 extern pthread_mutex_t objlock;
12 extern pthread_cond_t objcond;
13 extern pthread_key_t threadlocks;
14 extern pthread_mutex_t atomiclock;
16 extern pthread_key_t litemkey;
17 extern pthread_key_t macthreadid;
18 extern pthread_key_t memorybasekey;
19 extern pthread_key_t memorytopkey;
23 #define ATOMICLOCK if (pthread_mutex_trylock(&atomiclock)!=0) { \
24 stopforgc((struct garbagelist *) &___locals___); \
25 pthread_mutex_lock(&atomiclock); \
29 #define ATOMICUNLOCK pthread_mutex_unlock(&atomiclock)
31 #define ATOMICLOCK pthread_mutex_lock(&atomiclock)
32 #define ATOMICUNLOCK pthread_mutex_unlock(&atomiclock)
35 #if defined(THREADS)||defined(STM)
36 void initthread(ThreadPtr ___this___);
39 void initDSMthread(int *ptr);
40 void startDSMthread(int oid, int objType);
41 extern void * virtualtable[];