comparison src/share/vm/runtime/threadLocalStorage.cpp @ 356:1ee8caae33af

Merge
author tonyp
date Thu, 21 Aug 2008 23:36:31 -0400
parents d95b224e9f17
children 9ee9cf798b59
comparison
equal deleted inserted replaced
355:0edda524b58c 356:1ee8caae33af
40 guarantee(get_thread() == thread, "must be the same thread, quickly"); 40 guarantee(get_thread() == thread, "must be the same thread, quickly");
41 guarantee(get_thread_slow() == thread, "must be the same thread, slowly"); 41 guarantee(get_thread_slow() == thread, "must be the same thread, slowly");
42 } 42 }
43 43
44 void ThreadLocalStorage::init() { 44 void ThreadLocalStorage::init() {
45 assert(ThreadLocalStorage::thread_index() == -1, "More than one attempt to initialize threadLocalStorage"); 45 assert(!is_initialized(),
46 "More than one attempt to initialize threadLocalStorage");
46 pd_init(); 47 pd_init();
47 set_thread_index(os::allocate_thread_local_storage()); 48 set_thread_index(os::allocate_thread_local_storage());
48 generate_code_for_get_thread(); 49 generate_code_for_get_thread();
49 } 50 }
51
52 bool ThreadLocalStorage::is_initialized() {
53 return (thread_index() != -1);
54 }