1263
1264
1265 ThreadFunction entry_point() const { return _entry_point; }
1266
1267 // Allocates a new Java level thread object for this thread. thread_name may be NULL.
1268 void allocate_threadObj(Handle thread_group, const char* thread_name, bool daemon, TRAPS);
1269
1270 // Last frame anchor routines
1271
1272 JavaFrameAnchor* frame_anchor(void) { return &_anchor; }
1273
1274 // last_Java_sp
1275 bool has_last_Java_frame() const { return _anchor.has_last_Java_frame(); }
1276 intptr_t* last_Java_sp() const { return _anchor.last_Java_sp(); }
1277
1278 // last_Java_pc
1279
1280 address last_Java_pc(void) { return _anchor.last_Java_pc(); }
1281
1282 // Safepoint support
1283 #if !(defined(PPC64) || defined(AARCH64))
1284 JavaThreadState thread_state() const { return _thread_state; }
1285 void set_thread_state(JavaThreadState s) { _thread_state = s; }
1286 #else
1287 // Use membars when accessing volatile _thread_state. See
1288 // Threads::create_vm() for size checks.
1289 inline JavaThreadState thread_state() const;
1290 inline void set_thread_state(JavaThreadState s);
1291 #endif
1292 inline ThreadSafepointState* safepoint_state() const;
1293 inline void set_safepoint_state(ThreadSafepointState* state);
1294 inline bool is_at_poll_safepoint();
1295
1296 // JavaThread termination and lifecycle support:
1297 void smr_delete();
1298 bool on_thread_list() const { return _on_thread_list; }
1299 void set_on_thread_list() { _on_thread_list = true; }
1300
1301 // thread has called JavaThread::exit() or is terminated
1302 bool is_exiting() const;
1303 // thread is terminated (no longer on the threads list); we compare
1304 // against the two non-terminated values so that a freed JavaThread
1305 // will also be considered terminated.
1306 bool check_is_terminated(TerminatedTypes l_terminated) const {
1307 return l_terminated != _not_terminated && l_terminated != _thread_exiting;
1308 }
1309 bool is_terminated() const;
1310 void set_terminated(TerminatedTypes t);
1311 // special for Threads::remove() which is static:
|
1263
1264
1265 ThreadFunction entry_point() const { return _entry_point; }
1266
1267 // Allocates a new Java level thread object for this thread. thread_name may be NULL.
1268 void allocate_threadObj(Handle thread_group, const char* thread_name, bool daemon, TRAPS);
1269
1270 // Last frame anchor routines
1271
1272 JavaFrameAnchor* frame_anchor(void) { return &_anchor; }
1273
1274 // last_Java_sp
1275 bool has_last_Java_frame() const { return _anchor.has_last_Java_frame(); }
1276 intptr_t* last_Java_sp() const { return _anchor.last_Java_sp(); }
1277
1278 // last_Java_pc
1279
1280 address last_Java_pc(void) { return _anchor.last_Java_pc(); }
1281
1282 // Safepoint support
1283 inline JavaThreadState thread_state() const;
1284 inline void set_thread_state(JavaThreadState s);
1285 inline ThreadSafepointState* safepoint_state() const;
1286 inline void set_safepoint_state(ThreadSafepointState* state);
1287 inline bool is_at_poll_safepoint();
1288
1289 // JavaThread termination and lifecycle support:
1290 void smr_delete();
1291 bool on_thread_list() const { return _on_thread_list; }
1292 void set_on_thread_list() { _on_thread_list = true; }
1293
1294 // thread has called JavaThread::exit() or is terminated
1295 bool is_exiting() const;
1296 // thread is terminated (no longer on the threads list); we compare
1297 // against the two non-terminated values so that a freed JavaThread
1298 // will also be considered terminated.
1299 bool check_is_terminated(TerminatedTypes l_terminated) const {
1300 return l_terminated != _not_terminated && l_terminated != _thread_exiting;
1301 }
1302 bool is_terminated() const;
1303 void set_terminated(TerminatedTypes t);
1304 // special for Threads::remove() which is static:
|