RFR: 8341413: Stop including osThread_os.hpp in the middle of the OSThread class [v2]
David Holmes
dholmes at openjdk.org
Fri Oct 4 05:41:37 UTC 2024
On Thu, 3 Oct 2024 12:56:06 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
> I found that the field is not available on Windows, and it's also left uninitialized when we call create_attached_thread.
I did some archaeology on this one. The thread_type was introduced way back in May 2000 on Linux as it was needed for the newly started thread to determine whether it had to install (and later remove) an alternate signal stack. When we later stopped using alt-signal-stack (I'm going to guess this was when we switched from LinuxThreads to NPTL) the field was no longer used, but meanwhile we used the ThreadType enum to control initial stack sizes. So Windows never had a thread_type field and BSD/AIX likely just blindly copied it from the Linux code.
Attaching a thread never involved using alt-signal-stack so for attached threads it was left uninitialized.
So I think we can clean this up - I will file a RFE.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21306#issuecomment-2392862035
More information about the graal-dev
mailing list