hotspot/src/os/solaris/vm/os_solaris.cpp
void ThreadLocalStorage::pd_set_thread(Thread* thread) {
{- -------------------------------------------
(1) os::thread_local_storage_at_put() を呼んで Thread オブジェクトを登録
---------------------------------------- -}
// Store the new value before updating the cache to prevent a race
// between get_thread_via_cache_slowly() and this store operation.
os::thread_local_storage_at_put(ThreadLocalStorage::thread_index(), thread);
{- -------------------------------------------
(1) キャッシュも更新しておく
---------------------------------------- -}
// Update thread cache with new thread if setting on thread create,
// or NO_CACHED_THREAD (zeroed) thread if resetting thread on exit.
uintptr_t raw = pd_raw_thread_id();
int ix = pd_cache_index(raw);
_get_thread_cache[ix] = thread == NULL ? NO_CACHED_THREAD : thread;
}
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.