src/hotspot/share/runtime/handshake.hpp
changeset 52341 2b58b8e1d28f
parent 50626 9fdfe5ca0e5e
child 53244 9807daeb47c4
equal deleted inserted replaced
52340:adb107c71a12 52341:2b58b8e1d28f
    58 
    58 
    59   bool claim_handshake_for_vmthread();
    59   bool claim_handshake_for_vmthread();
    60   bool vmthread_can_process_handshake(JavaThread* target);
    60   bool vmthread_can_process_handshake(JavaThread* target);
    61 
    61 
    62   void clear_handshake(JavaThread* thread);
    62   void clear_handshake(JavaThread* thread);
    63   void cancel_inner(JavaThread* thread);
       
    64 
    63 
    65   void process_self_inner(JavaThread* thread);
    64   void process_self_inner(JavaThread* thread);
    66 public:
    65 public:
    67   HandshakeState();
    66   HandshakeState();
    68 
    67 
    70 
    69 
    71   bool has_operation() const {
    70   bool has_operation() const {
    72     return _operation != NULL;
    71     return _operation != NULL;
    73   }
    72   }
    74 
    73 
    75   void cancel(JavaThread* thread) {
       
    76     if (!_thread_in_process_handshake) {
       
    77       FlagSetting fs(_thread_in_process_handshake, true);
       
    78       cancel_inner(thread);
       
    79     }
       
    80   }
       
    81 
       
    82   void process_by_self(JavaThread* thread) {
    74   void process_by_self(JavaThread* thread) {
    83     if (!_thread_in_process_handshake) {
    75     if (!_thread_in_process_handshake) {
    84       FlagSetting fs(_thread_in_process_handshake, true);
    76       FlagSetting fs(_thread_in_process_handshake, true);
    85       process_self_inner(thread);
    77       process_self_inner(thread);
    86     }
    78     }
    87   }
    79   }
       
    80 
    88   void process_by_vmthread(JavaThread* target);
    81   void process_by_vmthread(JavaThread* target);
    89 };
    82 };
    90 
    83 
    91 #endif // SHARE_VM_RUNTIME_HANDSHAKE_HPP
    84 #endif // SHARE_VM_RUNTIME_HANDSHAKE_HPP