Skip to content

Conversation

@Sonicadvance1
Copy link
Member

Alloc::OSAllocator uses a TLS variable of the thread object so it can use a forkable mutex plus a deferring signal section. This was setup when the FEXCore "ExecutionThread" function is called, which is a bit awkward and is an artifact from when the thread creation was mixed between the frontend and the backend.

Instead let the frontend inform the backend when to install the TLS variable.

This is one step required to make GdbServer work correctly again since the thread initialization and pausing is awkward today.

Sonicadvance1 added a commit to Sonicadvance1/FEX that referenced this pull request Nov 28, 2024
Relies on FEX-Emu#4174 first to move TLS setup to the frontend.

Only in one location does the frontend actually care about this, the
backend doesn't care at all.
Alloc::OSAllocator uses a TLS variable of the thread object so it can
use a forkable mutex plus a deferring signal section. This was setup
when the FEXCore "ExecutionThread" function is called, which is a bit
awkward and is an artifact from when the thread creation was mixed
between the frontend and the backend.

Instead let the frontend inform the backend when to install the TLS
variable.

This is one step required to make GdbServer work correctly again since
the thread initialization and pausing is awkward today.
@Sonicadvance1 Sonicadvance1 force-pushed the gdbserver_move_alloc_tls branch from cb38c8d to 3ecc66f Compare November 28, 2024 10:46
@Sonicadvance1 Sonicadvance1 merged commit 0596a96 into FEX-Emu:main Nov 28, 2024
12 checks passed
@Sonicadvance1 Sonicadvance1 deleted the gdbserver_move_alloc_tls branch November 28, 2024 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants