hotspot/src/share/vm/runtime/threadLocalStorage.cpp
changeset 950 6112b627bb36
parent 1 489c9b5090e2
child 1217 5eb97f366a6a
equal deleted inserted replaced
823:9a5271881bc0 950:6112b627bb36
    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 }