src/hotspot/share/runtime/thread.hpp
changeset 54955 46409371a691
parent 54807 33fe50b6d707
child 55005 9b70ebd131b4
equal deleted inserted replaced
54954:6ec71a88b68e 54955:46409371a691
   981 class JavaThread: public Thread {
   981 class JavaThread: public Thread {
   982   friend class VMStructs;
   982   friend class VMStructs;
   983   friend class JVMCIVMStructs;
   983   friend class JVMCIVMStructs;
   984   friend class WhiteBox;
   984   friend class WhiteBox;
   985  private:
   985  private:
   986   JavaThread*    _next;                          // The next thread in the Threads list
       
   987   bool           _on_thread_list;                // Is set when this JavaThread is added to the Threads list
   986   bool           _on_thread_list;                // Is set when this JavaThread is added to the Threads list
   988   oop            _threadObj;                     // The Java level thread object
   987   oop            _threadObj;                     // The Java level thread object
   989 
   988 
   990 #ifdef ASSERT
   989 #ifdef ASSERT
   991  private:
   990  private:
  1244   void cleanup_failed_attach_current_thread(bool is_daemon);
  1243   void cleanup_failed_attach_current_thread(bool is_daemon);
  1245 
  1244 
  1246   // Testers
  1245   // Testers
  1247   virtual bool is_Java_thread() const            { return true;  }
  1246   virtual bool is_Java_thread() const            { return true;  }
  1248   virtual bool can_call_java() const             { return true; }
  1247   virtual bool can_call_java() const             { return true; }
  1249 
       
  1250   // Thread chain operations
       
  1251   JavaThread* next() const                       { return _next; }
       
  1252   void set_next(JavaThread* p)                   { _next = p; }
       
  1253 
  1248 
  1254   // Thread oop. threadObj() can be NULL for initial JavaThread
  1249   // Thread oop. threadObj() can be NULL for initial JavaThread
  1255   // (or for threads attached via JNI)
  1250   // (or for threads attached via JNI)
  1256   oop threadObj() const                          { return _threadObj; }
  1251   oop threadObj() const                          { return _threadObj; }
  1257   void set_threadObj(oop p)                      { _threadObj = p; }
  1252   void set_threadObj(oop p)                      { _threadObj = p; }
  2211 // The active thread queue. It also keeps track of the current used
  2206 // The active thread queue. It also keeps track of the current used
  2212 // thread priorities.
  2207 // thread priorities.
  2213 class Threads: AllStatic {
  2208 class Threads: AllStatic {
  2214   friend class VMStructs;
  2209   friend class VMStructs;
  2215  private:
  2210  private:
  2216   static JavaThread* _thread_list;
       
  2217   static int         _number_of_threads;
  2211   static int         _number_of_threads;
  2218   static int         _number_of_non_daemon_threads;
  2212   static int         _number_of_non_daemon_threads;
  2219   static int         _return_code;
  2213   static int         _return_code;
  2220   static uintx       _thread_claim_token;
  2214   static uintx       _thread_claim_token;
  2221 #ifdef ASSERT
  2215 #ifdef ASSERT