mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 14:37:08 +00:00
fixed_typemap.hpp: return reference
This commit is contained in:
parent
bbf52f3cea
commit
ea5e837bd6
87 changed files with 3028 additions and 2997 deletions
|
|
@ -27,26 +27,26 @@ struct libio_sys_config
|
|||
// Only exists internally (has no name)
|
||||
extern void libio_sys_config_init()
|
||||
{
|
||||
auto cfg = g_fxo->get<libio_sys_config>();
|
||||
auto& cfg = g_fxo->get<libio_sys_config>();
|
||||
|
||||
std::lock_guard lock(cfg->mtx);
|
||||
std::lock_guard lock(cfg.mtx);
|
||||
|
||||
if (cfg->init_ctr++ == 0)
|
||||
if (cfg.init_ctr++ == 0)
|
||||
{
|
||||
// Belongs to "_cfg_evt_hndlr" thread (8k stack)
|
||||
cfg->stack_addr = (ensure(vm::alloc(0x2000, vm::stack, 4096)));
|
||||
cfg.stack_addr = ensure(vm::alloc(0x2000, vm::stack, 4096));
|
||||
}
|
||||
}
|
||||
|
||||
extern void libio_sys_config_end()
|
||||
{
|
||||
auto cfg = g_fxo->get<libio_sys_config>();
|
||||
auto& cfg = g_fxo->get<libio_sys_config>();
|
||||
|
||||
std::lock_guard lock(cfg->mtx);
|
||||
std::lock_guard lock(cfg.mtx);
|
||||
|
||||
if (cfg->init_ctr-- == 1)
|
||||
if (cfg.init_ctr-- == 1)
|
||||
{
|
||||
ensure(vm::dealloc(std::exchange(cfg->stack_addr, 0), vm::stack));
|
||||
ensure(vm::dealloc(std::exchange(cfg.stack_addr, 0), vm::stack));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue