< prev index next >

src/hotspot/share/classfile/javaClasses.hpp

Print this page




 356   }
 357 
 358   // Debugging
 359   friend class JavaClasses;
 360   friend class InstanceKlass;   // verification code accesses offsets
 361   friend class ClassFileParser; // access to number_of_fake_fields
 362 };
 363 
 364 // Interface to java.lang.Thread objects
 365 
 366 class java_lang_Thread : AllStatic {
 367  private:
 368   // Note that for this class the layout changed between JDK1.2 and JDK1.3,
 369   // so we compute the offsets at startup rather than hard-wiring them.
 370   static int _name_offset;
 371   static int _group_offset;
 372   static int _contextClassLoader_offset;
 373   static int _inheritedAccessControlContext_offset;
 374   static int _priority_offset;
 375   static int _eetop_offset;

 376   static int _daemon_offset;
 377   static int _stillborn_offset;
 378   static int _stackSize_offset;
 379   static int _tid_offset;
 380   static int _thread_status_offset;
 381   static int _park_blocker_offset;
 382 
 383   static void compute_offsets();
 384 
 385  public:
 386   static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
 387 
 388   // Instance creation
 389   static oop create();
 390   // Returns the JavaThread associated with the thread obj
 391   static JavaThread* thread(oop java_thread);
 392   // Set JavaThread for instance
 393   static void set_thread(oop java_thread, JavaThread* thread);



 394   // Name
 395   static oop name(oop java_thread);
 396   static void set_name(oop java_thread, oop name);
 397   // Priority
 398   static ThreadPriority priority(oop java_thread);
 399   static void set_priority(oop java_thread, ThreadPriority priority);
 400   // Thread group
 401   static oop  threadGroup(oop java_thread);
 402   // Stillborn
 403   static bool is_stillborn(oop java_thread);
 404   static void set_stillborn(oop java_thread);
 405   // Alive (NOTE: this is not really a field, but provides the correct
 406   // definition without doing a Java call)
 407   static bool is_alive(oop java_thread);
 408   // Daemon
 409   static bool is_daemon(oop java_thread);
 410   static void set_daemon(oop java_thread);
 411   // Context ClassLoader
 412   static oop context_class_loader(oop java_thread);
 413   // Control context




 356   }
 357 
 358   // Debugging
 359   friend class JavaClasses;
 360   friend class InstanceKlass;   // verification code accesses offsets
 361   friend class ClassFileParser; // access to number_of_fake_fields
 362 };
 363 
 364 // Interface to java.lang.Thread objects
 365 
 366 class java_lang_Thread : AllStatic {
 367  private:
 368   // Note that for this class the layout changed between JDK1.2 and JDK1.3,
 369   // so we compute the offsets at startup rather than hard-wiring them.
 370   static int _name_offset;
 371   static int _group_offset;
 372   static int _contextClassLoader_offset;
 373   static int _inheritedAccessControlContext_offset;
 374   static int _priority_offset;
 375   static int _eetop_offset;
 376   static int _interrupted_offset;
 377   static int _daemon_offset;
 378   static int _stillborn_offset;
 379   static int _stackSize_offset;
 380   static int _tid_offset;
 381   static int _thread_status_offset;
 382   static int _park_blocker_offset;
 383 
 384   static void compute_offsets();
 385 
 386  public:
 387   static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
 388 
 389   // Instance creation
 390   static oop create();
 391   // Returns the JavaThread associated with the thread obj
 392   static JavaThread* thread(oop java_thread);
 393   // Set JavaThread for instance
 394   static void set_thread(oop java_thread, JavaThread* thread);
 395   // Interrupted status
 396   static bool interrupted(oop java_thread);
 397   static void set_interrupted(oop java_thread, bool val);
 398   // Name
 399   static oop name(oop java_thread);
 400   static void set_name(oop java_thread, oop name);
 401   // Priority
 402   static ThreadPriority priority(oop java_thread);
 403   static void set_priority(oop java_thread, ThreadPriority priority);
 404   // Thread group
 405   static oop  threadGroup(oop java_thread);
 406   // Stillborn
 407   static bool is_stillborn(oop java_thread);
 408   static void set_stillborn(oop java_thread);
 409   // Alive (NOTE: this is not really a field, but provides the correct
 410   // definition without doing a Java call)
 411   static bool is_alive(oop java_thread);
 412   // Daemon
 413   static bool is_daemon(oop java_thread);
 414   static void set_daemon(oop java_thread);
 415   // Context ClassLoader
 416   static oop context_class_loader(oop java_thread);
 417   // Control context


< prev index next >