Signed-off-by: Tomek Grabiec <tgrab...@gmail.com> --- vm/jato.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/vm/jato.c b/vm/jato.c index abec6ae..bc81864 100644 --- a/vm/jato.c +++ b/vm/jato.c @@ -567,6 +567,17 @@ static jlong native_vmsystem_nano_time(void) (unsigned long long)time.tv_nsec; } +static void native_vmobject_wait(struct vm_object *object, jlong ms, jint ns) +{ + if (ms == 0 && ns == 0) + vm_monitor_wait(&object->monitor); + else + vm_monitor_timed_wait(&object->monitor, ms, ns); + + if (exception_occurred()) + throw_from_native(sizeof(object) + sizeof(ms) + sizeof(ns)); +} + static struct vm_native natives[] = { DEFINE_NATIVE("gnu/classpath/VMStackWalker", "getClassContext", &native_vmstackwalker_getclasscontext), DEFINE_NATIVE("gnu/classpath/VMSystemProperties", "preInit", &native_vmsystemproperties_preinit), @@ -582,6 +593,7 @@ static struct vm_native natives[] = { DEFINE_NATIVE("java/lang/VMObject", "clone", &native_vmobject_clone), DEFINE_NATIVE("java/lang/VMObject", "notifyAll", &native_vmobject_notify_all), DEFINE_NATIVE("java/lang/VMObject", "getClass", &native_vmobject_getclass), + DEFINE_NATIVE("java/lang/VMObject", "wait", &native_vmobject_wait), DEFINE_NATIVE("java/lang/VMRuntime", "exit", &native_vmruntime_exit), DEFINE_NATIVE("java/lang/VMRuntime", "mapLibraryName", &native_vmruntime_maplibraryname), DEFINE_NATIVE("java/lang/VMRuntime", "nativeLoad", &native_vmruntime_native_load), -- 1.6.0.6 ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel