11 pthread_mutex_t gclock;
12 pthread_mutex_t gclistlock;
13 pthread_cond_t gccond;
14 pthread_mutex_t objlock;
15 pthread_cond_t objcond;
17 void initializethreads() {
19 pthread_mutex_init(&gclock, NULL);
20 pthread_mutex_init(&gclistlock, NULL);
21 pthread_cond_init(&gccond, NULL);
22 pthread_mutex_init(&objlock,NULL);
23 pthread_cond_init(&objcond,NULL);
26 void initthread(struct ___Thread___ * ___this___) {
28 struct ___Thread______staticStart____L___Thread____params p={1, NULL, ___this___};
29 ___Thread______staticStart____L___Thread___(&p);
31 ___Thread______staticStart____L___Thread___(___this___);
33 pthread_mutex_lock(&gclistlock);
35 pthread_cond_signal(&gccond);
36 pthread_mutex_unlock(&gclistlock);
39 void CALL01(___Thread______nativeCreate____, struct ___Thread___ * ___this___) {
41 pthread_mutex_lock(&gclistlock);
43 pthread_mutex_unlock(&gclistlock);
44 pthread_create(&thread, NULL,(void * (*)(void *)) &initthread, VAR(___this___));