src/hotspot/share/runtime/handshake.cpp
changeset 50192 8bc79d2d1568
parent 49449 ef5d5d343e2a
child 50626 9fdfe5ca0e5e
equal deleted inserted replaced
50191:c87fba18f2b9 50192:8bc79d2d1568
    27 #include "logging/logStream.hpp"
    27 #include "logging/logStream.hpp"
    28 #include "memory/resourceArea.hpp"
    28 #include "memory/resourceArea.hpp"
    29 #include "runtime/handshake.hpp"
    29 #include "runtime/handshake.hpp"
    30 #include "runtime/interfaceSupport.inline.hpp"
    30 #include "runtime/interfaceSupport.inline.hpp"
    31 #include "runtime/osThread.hpp"
    31 #include "runtime/osThread.hpp"
    32 #include "runtime/semaphore.hpp"
    32 #include "runtime/semaphore.inline.hpp"
    33 #include "runtime/task.hpp"
    33 #include "runtime/task.hpp"
    34 #include "runtime/timerTrace.hpp"
    34 #include "runtime/timerTrace.hpp"
    35 #include "runtime/thread.hpp"
    35 #include "runtime/thread.hpp"
    36 #include "runtime/vmThread.hpp"
    36 #include "runtime/vmThread.hpp"
    37 #include "utilities/formatBuffer.hpp"
    37 #include "utilities/formatBuffer.hpp"
   297 void HandshakeState::process_self_inner(JavaThread* thread) {
   297 void HandshakeState::process_self_inner(JavaThread* thread) {
   298   assert(Thread::current() == thread, "should call from thread");
   298   assert(Thread::current() == thread, "should call from thread");
   299   CautiouslyPreserveExceptionMark pem(thread);
   299   CautiouslyPreserveExceptionMark pem(thread);
   300   ThreadInVMForHandshake tivm(thread);
   300   ThreadInVMForHandshake tivm(thread);
   301   if (!_semaphore.trywait()) {
   301   if (!_semaphore.trywait()) {
   302     ThreadBlockInVM tbivm(thread);
   302     _semaphore.wait_with_safepoint_check(thread);
   303     _semaphore.wait();
       
   304   }
   303   }
   305   if (has_operation()) {
   304   if (has_operation()) {
   306     HandshakeOperation* op = _operation;
   305     HandshakeOperation* op = _operation;
   307     clear_handshake(thread);
   306     clear_handshake(thread);
   308     if (op != NULL) {
   307     if (op != NULL) {