On Thu, 5 May 2022 13:42:12 GMT, Jaroslav Bachorik <jbacho...@openjdk.org> 
wrote:

>> An option would be to place it after 
>> https://github.com/openjdk/jdk/blob/ce15582a7570b529a4c9b3d500f60fa0a2dc772d/src/hotspot/share/runtime/thread.hpp#L901
>>  but it would make the code less coherent.
>
> Ok, moved it a bit around - now the bool field is after an int field which 
> should make things slightly better, I guess.

At the start of JavaThread we have:

 private:
  bool           _on_thread_list;                // Is set when this JavaThread 
is added to the Threads list
  OopHandle      _threadObj;                     // The Java level thread object

so adding it next to the existing bool seems good. The accessors don't have to 
be defined at the same place.

-------------

PR: https://git.openjdk.java.net/jdk/pull/8549

Reply via email to