--- a/hotspot/src/share/vm/runtime/threadLocalStorage.cpp Sat Jul 19 17:38:22 2008 -0400
+++ b/hotspot/src/share/vm/runtime/threadLocalStorage.cpp Mon Jul 28 14:07:44 2008 -0400
@@ -42,8 +42,13 @@
}
void ThreadLocalStorage::init() {
- assert(ThreadLocalStorage::thread_index() == -1, "More than one attempt to initialize threadLocalStorage");
+ assert(!is_initialized(),
+ "More than one attempt to initialize threadLocalStorage");
pd_init();
set_thread_index(os::allocate_thread_local_storage());
generate_code_for_get_thread();
}
+
+bool ThreadLocalStorage::is_initialized() {
+ return (thread_index() != -1);
+}