9 int CALL01(___Object______hashCode____, struct ___Object___ * ___this___) {
10 return (int) VAR(___this___);
13 int CALL01(___Object______getType____, struct ___Object___ * ___this___) {
14 return ((int *)VAR(___this___))[0];
18 int CALL01(___Object______MonitorEnter____, struct ___Object___ * ___this___) {
19 pthread_t self=pthread_self();
20 if (self==VAR(___this___)->tid) {
21 VAR(___this___)->lockcount++;
24 struct listitem *tmp=stopforgc(stackptr);
26 pthread_mutex_lock(&objlock);
31 if (VAR(___this___)->tid==0) {
32 VAR(___this___)->lockcount=1;
33 VAR(___this___)->tid=self;
34 pthread_mutex_unlock(&objlock);
39 struct listitem *tmp=stopforgc(stackptr);
41 pthread_cond_wait(&objcond, &objlock);
50 int CALL01(___Object______MonitorExit____, struct ___Object___ * ___this___) {
51 pthread_t self=pthread_self();
52 if (self==VAR(___this___)->tid) {
53 VAR(___this___)->lockcount--;
54 if (VAR(___this___)->lockcount==0)
55 VAR(___this___)->tid=0;
56 pthread_mutex_lock(&objlock);
57 pthread_cond_broadcast(&objcond);
58 pthread_mutex_unlock(&objlock);
60 printf("ERROR...UNLOCKING LOCK WE DON'T HAVE\n");