#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"
*/
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"
*******************************************************************************/
-// 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);
}