merged volatile memory barriers
[cacao.git] / src / native / vm / cldc1.1 / java_lang_Object.cpp
index 2f934c6a4c85eafdbae7ed357389d59e01dfe4c8..8d4fa016b57107a5a144bc658b0f2d0a965d9dbf 100644 (file)
 
 #include "native/jni.hpp"
 #include "native/llni.h"
-#include "native/native.h"
+#include "native/native.hpp"
 
 #if defined(ENABLE_JNI_HEADERS)
 # include "native/include/java_lang_Object.h"
 #endif
 
-#include "threads/lock-common.h"
+#include "threads/lock.hpp"
 
 #include "vm/exceptions.hpp"
 #include "vm/javaobjects.hpp"
@@ -109,20 +109,9 @@ JNIEXPORT void JNICALL Java_java_lang_Object_notifyAll(JNIEnv *env, jobject _thi
  */
 JNIEXPORT void JNICALL Java_java_lang_Object_wait(JNIEnv *env, jobject _this, jlong timeout)
 {
-#if defined(ENABLE_JVMTI)
-       /* Monitor Wait */
-       if (jvmti) jvmti_MonitorWaiting(true, _this, timeout);
-#endif
-
 #if defined(ENABLE_THREADS)
        lock_wait_for_object((java_handle_t *) _this, timeout, 0);
 #endif
-
-#if defined(ENABLE_JVMTI)
-       /* Monitor Waited */
-       /* XXX: How do you know if wait timed out ?*/
-       if (jvmti) jvmti_MonitorWaiting(false, _this, 0);
-#endif
 }
 
 } // extern "C"
@@ -145,16 +134,12 @@ static JNINativeMethod methods[] = {
  
 *******************************************************************************/
  
-// FIXME
-extern "C" {
 void _Jv_java_lang_Object_init(void)
 {
-       utf *u;
-       u = utf_new_char("java/lang/Object");
+       utf* u = utf_new_char("java/lang/Object");
  
-       native_method_register(u, methods, NATIVE_METHODS_COUNT);
-}
+       NativeMethods& nm = VM::get_current()->get_nativemethods();
+       nm.register_methods(u, methods, NATIVE_METHODS_COUNT);
 }