comparison src/share/vm/prims/jvm.cpp @ 17805:bbfbe9b06038

Merge
author kvn
date Thu, 13 Mar 2014 14:57:01 -0700
parents 2b8e28fdf503 d35df3079834
children 386dd1c71858
comparison
equal deleted inserted replaced
17804:fd1b9f02cc91 17805:bbfbe9b06038
1 /* 1 /*
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
519 JVMWrapper("JVM_MonitorWait"); 519 JVMWrapper("JVM_MonitorWait");
520 Handle obj(THREAD, JNIHandles::resolve_non_null(handle)); 520 Handle obj(THREAD, JNIHandles::resolve_non_null(handle));
521 JavaThreadInObjectWaitState jtiows(thread, ms != 0); 521 JavaThreadInObjectWaitState jtiows(thread, ms != 0);
522 if (JvmtiExport::should_post_monitor_wait()) { 522 if (JvmtiExport::should_post_monitor_wait()) {
523 JvmtiExport::post_monitor_wait((JavaThread *)THREAD, (oop)obj(), ms); 523 JvmtiExport::post_monitor_wait((JavaThread *)THREAD, (oop)obj(), ms);
524
525 // The current thread already owns the monitor and it has not yet
526 // been added to the wait queue so the current thread cannot be
527 // made the successor. This means that the JVMTI_EVENT_MONITOR_WAIT
528 // event handler cannot accidentally consume an unpark() meant for
529 // the ParkEvent associated with this ObjectMonitor.
524 } 530 }
525 ObjectSynchronizer::wait(obj, ms, CHECK); 531 ObjectSynchronizer::wait(obj, ms, CHECK);
526 JVM_END 532 JVM_END
527 533
528 534