< prev index next >

src/hotspot/share/runtime/thread.hpp

Print this page




1323   void set_terminated(TerminatedTypes t);
1324   // special for Threads::remove() which is static:
1325   void set_terminated_value();
1326   void block_if_vm_exited();
1327 
1328   bool doing_unsafe_access()                     { return _doing_unsafe_access; }
1329   void set_doing_unsafe_access(bool val)         { _doing_unsafe_access = val; }
1330 
1331   bool do_not_unlock_if_synchronized()             { return _do_not_unlock_if_synchronized; }
1332   void set_do_not_unlock_if_synchronized(bool val) { _do_not_unlock_if_synchronized = val; }
1333 
1334   inline void set_polling_page_release(void* poll_value);
1335   inline void set_polling_page(void* poll_value);
1336   inline volatile void* get_polling_page();
1337 
1338  private:
1339   // Support for thread handshake operations
1340   HandshakeState _handshake;
1341  public:
1342   void set_handshake_operation(HandshakeOperation* op) {
1343     _handshake.set_operation(this, op);
1344   }
1345 
1346   bool has_handshake() const {
1347     return _handshake.has_operation();
1348   }
1349 
1350   void handshake_process_by_self() {
1351     _handshake.process_by_self(this);
1352   }
1353 
1354   bool handshake_try_process_by_vmThread() {
1355     return _handshake.try_process_by_vmThread(this);
1356   }
1357 
1358 #ifdef ASSERT
1359   bool is_vmthread_processing_handshake() const {
1360     return _handshake.is_vmthread_processing_handshake();
1361   }
1362 #endif
1363 
1364   // Suspend/resume support for JavaThread
1365  private:
1366   inline void set_ext_suspended();
1367   inline void clear_ext_suspended();
1368 
1369  public:
1370   void java_suspend(); // higher-level suspension logic called by the public APIs
1371   void java_resume();  // higher-level resume logic called by the public APIs
1372   int  java_suspend_self(); // low-level self-suspension mechanics
1373 
1374  private:
1375   // mid-level wrapper around java_suspend_self to set up correct state and
1376   // check for a pending safepoint at the end
1377   void java_suspend_self_with_safepoint_check();
1378 
1379  public:
1380   void check_and_wait_while_suspended() {




1323   void set_terminated(TerminatedTypes t);
1324   // special for Threads::remove() which is static:
1325   void set_terminated_value();
1326   void block_if_vm_exited();
1327 
1328   bool doing_unsafe_access()                     { return _doing_unsafe_access; }
1329   void set_doing_unsafe_access(bool val)         { _doing_unsafe_access = val; }
1330 
1331   bool do_not_unlock_if_synchronized()             { return _do_not_unlock_if_synchronized; }
1332   void set_do_not_unlock_if_synchronized(bool val) { _do_not_unlock_if_synchronized = val; }
1333 
1334   inline void set_polling_page_release(void* poll_value);
1335   inline void set_polling_page(void* poll_value);
1336   inline volatile void* get_polling_page();
1337 
1338  private:
1339   // Support for thread handshake operations
1340   HandshakeState _handshake;
1341  public:
1342   void set_handshake_operation(HandshakeOperation* op) {
1343     _handshake.set_operation(op);
1344   }
1345 
1346   bool has_handshake() const {
1347     return _handshake.has_operation();
1348   }
1349 
1350   void handshake_process_by_self() {
1351     _handshake.process_by_self();
1352   }
1353 
1354   bool handshake_try_process(HandshakeOperation* op) {
1355     return _handshake.try_process(op);
1356   }
1357 
1358 #ifdef ASSERT
1359   Thread* get_active_handshaker() const {
1360     return _handshake.get_active_handshaker();
1361   }
1362 #endif
1363 
1364   // Suspend/resume support for JavaThread
1365  private:
1366   inline void set_ext_suspended();
1367   inline void clear_ext_suspended();
1368 
1369  public:
1370   void java_suspend(); // higher-level suspension logic called by the public APIs
1371   void java_resume();  // higher-level resume logic called by the public APIs
1372   int  java_suspend_self(); // low-level self-suspension mechanics
1373 
1374  private:
1375   // mid-level wrapper around java_suspend_self to set up correct state and
1376   // check for a pending safepoint at the end
1377   void java_suspend_self_with_safepoint_check();
1378 
1379  public:
1380   void check_and_wait_while_suspended() {


< prev index next >