src/hotspot/share/gc/z/zThread.hpp
changeset 58706 d8e211419aaf
parent 58125 9b4717ca9bd1
--- a/src/hotspot/share/gc/z/zThread.hpp	Mon Oct 21 09:56:43 2019 +0200
+++ b/src/hotspot/share/gc/z/zThread.hpp	Mon Oct 21 09:56:58 2019 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,6 @@
 
 #include "memory/allocation.hpp"
 #include "utilities/globalDefinitions.hpp"
-#include "utilities/debug.hpp"
 
 class ZThread : public AllStatic {
   friend class ZTask;
@@ -43,12 +42,7 @@
   static THREAD_LOCAL uint      _worker_id;
 
   static void initialize();
-
-  static void ensure_initialized() {
-    if (!_initialized) {
-      initialize();
-    }
-  }
+  static void ensure_initialized();
 
   static void set_worker();
   static void set_runtime_worker();
@@ -59,36 +53,12 @@
 
 public:
   static const char* name();
-
-  static uintptr_t id() {
-    ensure_initialized();
-    return _id;
-  }
-
-  static bool is_vm() {
-    ensure_initialized();
-    return _is_vm;
-  }
-
-  static bool is_java() {
-    ensure_initialized();
-    return _is_java;
-  }
-
-  static bool is_worker() {
-    ensure_initialized();
-    return _is_worker;
-  }
-
-  static bool is_runtime_worker() {
-    ensure_initialized();
-    return _is_runtime_worker;
-  }
-
-  static uint worker_id() {
-    assert(has_worker_id(), "Worker id not initialized");
-    return _worker_id;
-  }
+  static uintptr_t id();
+  static bool is_vm();
+  static bool is_java();
+  static bool is_worker();
+  static bool is_runtime_worker();
+  static uint worker_id();
 };
 
 #endif // SHARE_GC_Z_ZTHREAD_HPP