src/hotspot/share/runtime/safepointMechanism.inline.hpp
changeset 50626 9fdfe5ca0e5e
parent 47881 0ce0ac68ace7
child 50921 7f462e8383f6
equal deleted inserted replaced
50625:d9753e3db0c6 50626:9fdfe5ca0e5e
    57 
    57 
    58 void SafepointMechanism::block_if_requested_local_poll(JavaThread *thread) {
    58 void SafepointMechanism::block_if_requested_local_poll(JavaThread *thread) {
    59   bool armed = local_poll_armed(thread); // load acquire, polling page -> op / global state
    59   bool armed = local_poll_armed(thread); // load acquire, polling page -> op / global state
    60   if(armed) {
    60   if(armed) {
    61     // We could be armed for either a handshake operation or a safepoint
    61     // We could be armed for either a handshake operation or a safepoint
       
    62     if (global_poll()) {
       
    63       SafepointSynchronize::block(thread);
       
    64     }
    62     if (thread->has_handshake()) {
    65     if (thread->has_handshake()) {
    63       thread->handshake_process_by_self();
    66       thread->handshake_process_by_self();
    64     } else {
       
    65       if (global_poll()) {
       
    66         SafepointSynchronize::block(thread);
       
    67       }
       
    68     }
    67     }
    69   }
    68   }
    70 }
    69 }
    71 
    70 
    72 void SafepointMechanism::block_if_requested(JavaThread *thread) {
    71 void SafepointMechanism::block_if_requested(JavaThread *thread) {