src/hotspot/share/runtime/safepointMechanism.inline.hpp
changeset 53646 043ae846819f
parent 53631 a5321bcfa2de
child 53775 5d20b085d893
equal deleted inserted replaced
53645:2c6c0fabe6a2 53646:043ae846819f
    60     return;
    60     return;
    61   }
    61   }
    62   block_if_requested_slow(thread);
    62   block_if_requested_slow(thread);
    63 }
    63 }
    64 
    64 
       
    65 void SafepointMechanism::callback_if_safepoint(JavaThread* thread) {
       
    66   if (!uses_thread_local_poll() || local_poll_armed(thread)) {
       
    67     // If using thread local polls, we should not check the
       
    68     // global_poll() and callback via block() if the VMThread
       
    69     // has not yet armed the local poll. Otherwise, when used in
       
    70     // combination with should_block(), the latter could miss
       
    71     // detecting the same safepoint that this method would detect
       
    72     // if only checking global polls.
       
    73     if (global_poll()) {
       
    74       SafepointSynchronize::block(thread, false);
       
    75     }
       
    76   }
       
    77 }
       
    78 
    65 void SafepointMechanism::arm_local_poll(JavaThread* thread) {
    79 void SafepointMechanism::arm_local_poll(JavaThread* thread) {
    66   thread->set_polling_page(poll_armed_value());
    80   thread->set_polling_page(poll_armed_value());
    67 }
    81 }
    68 
    82 
    69 void SafepointMechanism::disarm_local_poll(JavaThread* thread) {
    83 void SafepointMechanism::disarm_local_poll(JavaThread* thread) {