< prev index next >

src/hotspot/os/solaris/os_solaris.cpp

Print this page

        

*** 4919,4932 **** // In particular a thread must never block on the Threads_lock while // holding the Parker:: mutex. If safepoints are pending both the // the ThreadBlockInVM() CTOR and DTOR may grab Threads_lock. ThreadBlockInVM tbivm(jt); // Don't wait if cannot get lock since interference arises from ! // unblocking. Also. check interrupt before trying wait ! if (jt->is_interrupted(false) || ! os::Solaris::mutex_trylock(_mutex) != 0) { return; } int status; --- 4919,4934 ---- // In particular a thread must never block on the Threads_lock while // holding the Parker:: mutex. If safepoints are pending both the // the ThreadBlockInVM() CTOR and DTOR may grab Threads_lock. ThreadBlockInVM tbivm(jt); + // Can't access interrupt state now that we are _thread_blocked. If we've + // been interrupted since we checked above then _counter will be > 0. + // Don't wait if cannot get lock since interference arises from ! // unblocking. ! if (os::Solaris::mutex_trylock(_mutex) != 0) { return; } int status;
< prev index next >