1190 // thread has called JavaThread::exit() or is terminated
1191 bool is_exiting() const;
1192 // thread is terminated (no longer on the threads list); we compare
1193 // against the two non-terminated values so that a freed JavaThread
1194 // will also be considered terminated.
1195 bool check_is_terminated(TerminatedTypes l_terminated) const {
1196 return l_terminated != _not_terminated && l_terminated != _thread_exiting;
1197 }
1198 bool is_terminated() const;
1199 void set_terminated(TerminatedTypes t);
1200 // special for Threads::remove() which is static:
1201 void set_terminated_value();
1202 void block_if_vm_exited();
1203
1204 bool doing_unsafe_access() { return _doing_unsafe_access; }
1205 void set_doing_unsafe_access(bool val) { _doing_unsafe_access = val; }
1206
1207 bool do_not_unlock_if_synchronized() { return _do_not_unlock_if_synchronized; }
1208 void set_do_not_unlock_if_synchronized(bool val) { _do_not_unlock_if_synchronized = val; }
1209
1210 inline void set_polling_page(void* poll_value);
1211 inline volatile void* get_polling_page();
1212
1213 private:
1214 // Support for thread handshake operations
1215 HandshakeState _handshake;
1216 public:
1217 void set_handshake_operation(HandshakeOperation* op) {
1218 _handshake.set_operation(this, op);
1219 }
1220
1221 bool has_handshake() const {
1222 return _handshake.has_operation();
1223 }
1224
1225 void cancel_handshake() {
1226 _handshake.cancel(this);
1227 }
1228
1229 void handshake_process_by_self() {
|
1190 // thread has called JavaThread::exit() or is terminated
1191 bool is_exiting() const;
1192 // thread is terminated (no longer on the threads list); we compare
1193 // against the two non-terminated values so that a freed JavaThread
1194 // will also be considered terminated.
1195 bool check_is_terminated(TerminatedTypes l_terminated) const {
1196 return l_terminated != _not_terminated && l_terminated != _thread_exiting;
1197 }
1198 bool is_terminated() const;
1199 void set_terminated(TerminatedTypes t);
1200 // special for Threads::remove() which is static:
1201 void set_terminated_value();
1202 void block_if_vm_exited();
1203
1204 bool doing_unsafe_access() { return _doing_unsafe_access; }
1205 void set_doing_unsafe_access(bool val) { _doing_unsafe_access = val; }
1206
1207 bool do_not_unlock_if_synchronized() { return _do_not_unlock_if_synchronized; }
1208 void set_do_not_unlock_if_synchronized(bool val) { _do_not_unlock_if_synchronized = val; }
1209
1210 inline void set_polling_page_release(void* poll_value);
1211 inline void set_polling_page(void* poll_value);
1212 inline volatile void* get_polling_page();
1213
1214 private:
1215 // Support for thread handshake operations
1216 HandshakeState _handshake;
1217 public:
1218 void set_handshake_operation(HandshakeOperation* op) {
1219 _handshake.set_operation(this, op);
1220 }
1221
1222 bool has_handshake() const {
1223 return _handshake.has_operation();
1224 }
1225
1226 void cancel_handshake() {
1227 _handshake.cancel(this);
1228 }
1229
1230 void handshake_process_by_self() {
|