c89 fix.
[cacao.git] / nat / VMObject.c
index 131f35eee5512eb3598edfe931194a9c3c120945..882086e4344fdd931c88ae0ab5b7d9fb16fdf75a 100644 (file)
 
    Changes: Joseph Wenninger
 
-   $Id: VMObject.c 1227 2004-06-30 19:29:35Z twisti $
+   $Id: VMObject.c 1377 2004-08-01 22:01:00Z stefan $
 
 */
 
 
 #include <stdlib.h>
 #include <string.h>
+#include "exceptions.h"
 #include "jni.h"
 #include "builtin.h"
 #include "loader.h"
@@ -67,7 +68,7 @@ JNIEXPORT java_lang_Object* JNICALL Java_java_lang_VMObject_clone(JNIEnv *env, j
                new = (java_lang_Object *) heap_allocate(size, (desc->arraytype == ARRAYTYPE_OBJECT), NULL);
                memcpy(new, this, size);
 #if defined(USE_THREADS) && defined(NATIVE_THREADS)
-               new->header.monitorBits = 0;
+               initObjectLock(new);
 #endif
         
                return new;
@@ -89,7 +90,7 @@ JNIEXPORT java_lang_Object* JNICALL Java_java_lang_VMObject_clone(JNIEnv *env, j
 
     memcpy(new, this, c->instancesize);
 #if defined(USE_THREADS) && defined(NATIVE_THREADS)
-       new->header.monitorBits = 0;
+       initObjectLock(new);
 #endif
 
     return new;
@@ -139,7 +140,7 @@ JNIEXPORT void JNICALL Java_java_lang_VMObject_wait(JNIEnv *env, jclass clazz, j
                log_text("java_lang_VMObject_wait called");
 
 #if defined(USE_THREADS)
-       wait_cond_for_object(&this->header, time);
+       wait_cond_for_object(&this->header, time, par3);
 #endif
 }