src/hotspot/share/gc/z/zThread.hpp
changeset 53072 82d3f0820d37
parent 50525 767cdb97f103
child 58125 9b4717ca9bd1
--- a/src/hotspot/share/gc/z/zThread.hpp	Tue Dec 18 13:37:06 2018 -0800
+++ b/src/hotspot/share/gc/z/zThread.hpp	Wed Dec 19 08:32:48 2018 +0100
@@ -29,6 +29,8 @@
 
 class ZThread : public AllStatic {
   friend class ZTask;
+  friend class ZWorkersInitializeTask;
+  friend class ZRuntimeWorkersInitializeTask;
 
 private:
   static __thread bool      _initialized;
@@ -36,6 +38,7 @@
   static __thread bool      _is_vm;
   static __thread bool      _is_java;
   static __thread bool      _is_worker;
+  static __thread bool      _is_runtime_worker;
   static __thread uint      _worker_id;
 
   static void initialize();
@@ -46,6 +49,9 @@
     }
   }
 
+  static void set_worker();
+  static void set_runtime_worker();
+
   static bool has_worker_id();
   static void set_worker_id(uint worker_id);
   static void clear_worker_id();
@@ -73,6 +79,11 @@
     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;