mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-24 04:54:40 +02:00
8132510: Replace ThreadLocalStorage with compiler/language-based thread-local variables
Used compiled-based TLS when available. Additional contributions by Thomas Stufe (AIX) and Andrew Haley (Aarch64) Reviewed-by: stuefe, bdelsart, dcubed
This commit is contained in:
parent
8929fdddb8
commit
6e0ea9d21c
101 changed files with 449 additions and 1966 deletions
|
@ -378,7 +378,7 @@ 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");
|
||||
|
||||
|
@ -400,7 +400,7 @@ int VM_Exit::wait_for_threads_in_native_to_block() {
|
|||
// 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);
|
||||
|
||||
|
@ -477,7 +477,7 @@ void VM_Exit::doit() {
|
|||
|
||||
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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue