8187040: ThreadCritical crashes on Solaris if used between os::init and os::init_2

Reviewed-by: dholmes, stuefe
This commit is contained in:
Mikael Gerdin 2017-09-25 21:25:46 -04:00
parent 7a446900da
commit 04b79fa8f3
11 changed files with 8 additions and 54 deletions

View file

@ -4076,6 +4076,7 @@ int_fnP_cond_tP os::Solaris::_cond_broadcast;
int_fnP_cond_tP_i_vP os::Solaris::_cond_init;
int_fnP_cond_tP os::Solaris::_cond_destroy;
int os::Solaris::_cond_scope = USYNC_THREAD;
bool os::Solaris::_synchronization_initialized;
void os::Solaris::synchronization_init() {
if (UseLWPSynchronization) {
@ -4125,6 +4126,7 @@ void os::Solaris::synchronization_init() {
os::Solaris::set_cond_destroy(::cond_destroy);
}
}
_synchronization_initialized = true;
}
bool os::Solaris::liblgrp_init() {
@ -4198,9 +4200,6 @@ void os::init(void) {
dladdr1_func = CAST_TO_FN_PTR(dladdr1_func_type, dlsym(hdl, "dladdr1"));
}
// (Solaris only) this switches to calls that actually do locking.
ThreadCritical::initialize();
main_thread = thr_self();
// dynamic lookup of functions that may not be available in our lowest