< prev index next >

src/hotspot/share/classfile/javaClasses.hpp

Print this page




 347   }
 348 
 349   // Debugging
 350   friend class JavaClasses;
 351   friend class InstanceKlass;   // verification code accesses offsets
 352   friend class ClassFileParser; // access to number_of_fake_fields
 353 };
 354 
 355 // Interface to java.lang.Thread objects
 356 
 357 class java_lang_Thread : AllStatic {
 358  private:
 359   // Note that for this class the layout changed between JDK1.2 and JDK1.3,
 360   // so we compute the offsets at startup rather than hard-wiring them.
 361   static int _name_offset;
 362   static int _group_offset;
 363   static int _contextClassLoader_offset;
 364   static int _inheritedAccessControlContext_offset;
 365   static int _priority_offset;
 366   static int _eetop_offset;

 367   static int _daemon_offset;
 368   static int _stillborn_offset;
 369   static int _stackSize_offset;
 370   static int _tid_offset;
 371   static int _thread_status_offset;
 372   static int _park_blocker_offset;
 373 
 374   static void compute_offsets();
 375 
 376  public:
 377   static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
 378 
 379   // Instance creation
 380   static oop create();
 381   // Returns the JavaThread associated with the thread obj
 382   static JavaThread* thread(oop java_thread);
 383   // Set JavaThread for instance
 384   static void set_thread(oop java_thread, JavaThread* thread);



 385   // Name
 386   static oop name(oop java_thread);
 387   static void set_name(oop java_thread, oop name);
 388   // Priority
 389   static ThreadPriority priority(oop java_thread);
 390   static void set_priority(oop java_thread, ThreadPriority priority);
 391   // Thread group
 392   static oop  threadGroup(oop java_thread);
 393   // Stillborn
 394   static bool is_stillborn(oop java_thread);
 395   static void set_stillborn(oop java_thread);
 396   // Alive (NOTE: this is not really a field, but provides the correct
 397   // definition without doing a Java call)
 398   static bool is_alive(oop java_thread);
 399   // Daemon
 400   static bool is_daemon(oop java_thread);
 401   static void set_daemon(oop java_thread);
 402   // Context ClassLoader
 403   static oop context_class_loader(oop java_thread);
 404   // Control context




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


< prev index next >