< prev index next >
src/os/aix/vm/os_aix.cpp
Print this page
*** 900,910 ****
static int counter = 0;
int pid = os::current_process_id();
alloca(((pid ^ counter++) & 7) * 128);
! ThreadLocalStorage::set_thread(thread);
OSThread* osthread = thread->osthread();
// thread_id is kernel thread id (similar to Solaris LWP id)
osthread->set_thread_id(os::Aix::gettid());
--- 900,910 ----
static int counter = 0;
int pid = os::current_process_id();
alloca(((pid ^ counter++) & 7) * 128);
! thread->initialize_thread_current();
OSThread* osthread = thread->osthread();
// thread_id is kernel thread id (similar to Solaris LWP id)
osthread->set_thread_id(os::Aix::gettid());
*** 1075,1110 ****
}
delete osthread;
}
- //////////////////////////////////////////////////////////////////////////////
- // thread local storage
-
- int os::allocate_thread_local_storage() {
- pthread_key_t key;
- int rslt = pthread_key_create(&key, NULL);
- assert(rslt == 0, "cannot allocate thread local storage");
- return (int)key;
- }
-
- // Note: This is currently not used by VM, as we don't destroy TLS key
- // on VM exit.
- void os::free_thread_local_storage(int index) {
- int rslt = pthread_key_delete((pthread_key_t)index);
- assert(rslt == 0, "invalid index");
- }
-
- void os::thread_local_storage_at_put(int index, void* value) {
- int rslt = pthread_setspecific((pthread_key_t)index, value);
- assert(rslt == 0, "pthread_setspecific failed");
- }
-
- extern "C" Thread* get_thread() {
- return ThreadLocalStorage::thread();
- }
-
////////////////////////////////////////////////////////////////////////////////
// time support
// Time since start-up in seconds to a fine granularity.
// Used by VMSelfDestructTimer and the MemProfiler.
--- 1075,1084 ----
< prev index next >