hotspot/src/share/vm/runtime/threadLocalStorage.cpp
changeset 950 6112b627bb36
parent 1 489c9b5090e2
child 1217 5eb97f366a6a
--- 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);
+}