comparison src/share/vm/prims/jvm.cpp @ 14342:78fde43dc07d

Merge
author iklam
date Tue, 11 Feb 2014 10:05:02 -0800
parents ad3f8397fe37 c025990068c4
children e6195383bcaf 8a9bb7821e28
comparison
equal deleted inserted replaced
14341:ad3f8397fe37 14342:78fde43dc07d
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.
516 JVMWrapper("JVM_MonitorWait"); 516 JVMWrapper("JVM_MonitorWait");
517 Handle obj(THREAD, JNIHandles::resolve_non_null(handle)); 517 Handle obj(THREAD, JNIHandles::resolve_non_null(handle));
518 JavaThreadInObjectWaitState jtiows(thread, ms != 0); 518 JavaThreadInObjectWaitState jtiows(thread, ms != 0);
519 if (JvmtiExport::should_post_monitor_wait()) { 519 if (JvmtiExport::should_post_monitor_wait()) {
520 JvmtiExport::post_monitor_wait((JavaThread *)THREAD, (oop)obj(), ms); 520 JvmtiExport::post_monitor_wait((JavaThread *)THREAD, (oop)obj(), ms);
521
522 // The current thread already owns the monitor and it has not yet
523 // been added to the wait queue so the current thread cannot be
524 // made the successor. This means that the JVMTI_EVENT_MONITOR_WAIT
525 // event handler cannot accidentally consume an unpark() meant for
526 // the ParkEvent associated with this ObjectMonitor.
521 } 527 }
522 ObjectSynchronizer::wait(obj, ms, CHECK); 528 ObjectSynchronizer::wait(obj, ms, CHECK);
523 JVM_END 529 JVM_END
524 530
525 531