mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 22:47:03 +00:00
Fixed TLS for PPU threads
This commit is contained in:
parent
2be045593a
commit
4ea1b8cffc
4 changed files with 72 additions and 3 deletions
|
|
@ -18,6 +18,8 @@ namespace sce_libc_func
|
|||
{
|
||||
sceLibc.Error("__cxa_atexit(func=0x%x, arg=0x%x, dso=0x%x)", func, arg, dso);
|
||||
|
||||
LV2_LOCK(0);
|
||||
|
||||
g_atexit.insert(g_atexit.begin(), [func, arg, dso](ARMv7Context& context)
|
||||
{
|
||||
func(context, arg);
|
||||
|
|
@ -28,6 +30,8 @@ namespace sce_libc_func
|
|||
{
|
||||
sceLibc.Error("__aeabi_atexit(arg=0x%x, func=0x%x, dso=0x%x)", arg, func, dso);
|
||||
|
||||
LV2_LOCK(0);
|
||||
|
||||
g_atexit.insert(g_atexit.begin(), [func, arg, dso](ARMv7Context& context)
|
||||
{
|
||||
func(context, arg);
|
||||
|
|
@ -38,6 +42,8 @@ namespace sce_libc_func
|
|||
{
|
||||
sceLibc.Error("exit()");
|
||||
|
||||
LV2_LOCK(0);
|
||||
|
||||
for (auto func : g_atexit)
|
||||
{
|
||||
func(context);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue