< prev index next >
src/share/vm/runtime/vm_operations.cpp
Print this page
@@ -376,11 +376,11 @@
Thread * VM_Exit::_shutdown_thread = NULL;
int VM_Exit::set_vm_exited() {
CodeCacheExtensions::complete_step(CodeCacheExtensionsSteps::LastStep);
- Thread * thr_cur = ThreadLocalStorage::get_thread_slow();
+ Thread * thr_cur = Thread::current();
assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint already");
int num_active = 0;
@@ -398,11 +398,11 @@
int VM_Exit::wait_for_threads_in_native_to_block() {
// VM exits at safepoint. This function must be called at the final safepoint
// to wait for threads in _thread_in_native state to be quiescent.
assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint already");
- Thread * thr_cur = ThreadLocalStorage::get_thread_slow();
+ Thread * thr_cur = Thread::current();
Monitor timer(Mutex::leaf, "VM_Exit timer", true,
Monitor::_safepoint_check_never);
// Compiler threads need longer wait because they can access VM data directly
// while in native. If they are active and some structures being used are
@@ -475,11 +475,11 @@
}
void VM_Exit::wait_if_vm_exited() {
if (_vm_exited &&
- ThreadLocalStorage::get_thread_slow() != _shutdown_thread) {
+ Thread::current_or_null() != _shutdown_thread) {
// _vm_exited is set at safepoint, and the Threads_lock is never released
// we will block here until the process dies
Threads_lock->lock_without_safepoint_check();
ShouldNotReachHere();
}
< prev index next >