HomeFreeBSD

libthr/amd64: do not set THR_C_RUNTIME for thr_new() if the main thread did…

Description

libthr/amd64: do not set THR_C_RUNTIME for thr_new() if the main thread did used AMD64_SET_TLSBASE

It is up to the code that organizes the runtime to properly set the
signal handler, and to set %fsbase if libthr signal handler is to be
called. The change should leave the CPU state on the signal handler
entry identical to what it was before introduction of TLSBASE, for code
that provides its own startup and thread pointer, but still calls into
libthr as a hack.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

Details

Provenance
kibAuthored on Jun 1 2025, 7:00 AM
Parents
rG2e91875bc2d8: libkvm/kvm_open.3: document broken full dumps
Branches
Unknown
Tags
Unknown