< prev index next >

src/hotspot/share/prims/jvmtiEnvBase.hpp

Print this page

        

@@ -423,29 +423,27 @@
     _result = ((JvmtiEnvBase*) _env)->get_object_monitor_usage(_calling_thread, _object, _info_ptr);
   }
 
 };
 
-// VM operation to get current contended monitor.
-class VM_GetCurrentContendedMonitor : public VM_Operation {
+// HandshakeClosure to get current contended monitor.
+class GetOneCurrentContendedMonitor : public HandshakeClosure {
 private:
   JvmtiEnv *_env;
   JavaThread *_calling_thread;
-  JavaThread *_java_thread;
   jobject *_owned_monitor_ptr;
   jvmtiError _result;
 
 public:
-  VM_GetCurrentContendedMonitor(JvmtiEnv *env, JavaThread *calling_thread, JavaThread *java_thread, jobject *mon_ptr) {
+  GetOneCurrentContendedMonitor(JvmtiEnv *env, JavaThread *calling_thread, jobject *mon_ptr) : HandshakeClosure("GetOneCurrentContendedMonitor") {
     _env = env;
     _calling_thread = calling_thread;
-    _java_thread = java_thread;
     _owned_monitor_ptr = mon_ptr;
+    _result = JVMTI_ERROR_THREAD_NOT_ALIVE;
   }
-  VMOp_Type type() const { return VMOp_GetCurrentContendedMonitor; }
   jvmtiError result() { return _result; }
-  void doit();
+  void do_thread(Thread *target);
 };
 
 // VM operation to get stack trace at safepoint.
 class VM_GetStackTrace : public VM_Operation {
 private:
< prev index next >