Skip to content

Commit

Permalink
ThreadManager: Store off the syscallHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
Sonicadvance1 committed Dec 10, 2024
1 parent 6007e46 commit 121af75
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Source/Tools/LinuxEmulation/LinuxSyscalls/Syscalls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ void SyscallHandler::DefaultProgramBreak(uint64_t Base, uint64_t Size) {
}

SyscallHandler::SyscallHandler(FEXCore::Context::Context* _CTX, FEX::HLE::SignalDelegator* _SignalDelegation, FEX::HLE::ThunkHandler* ThunkHandler)
: TM {_CTX, _SignalDelegation}
: TM {_CTX, this, _SignalDelegation}
, SeccompEmulator {this, _SignalDelegation}
, FM {_CTX}
, CTX {_CTX}
Expand Down
4 changes: 3 additions & 1 deletion Source/Tools/LinuxEmulation/LinuxSyscalls/ThreadManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,9 @@ struct ThreadStateObject : public FEXCore::Allocator::FEXAllocOperators {
class ThreadManager final {
public:

ThreadManager(FEXCore::Context::Context* CTX, FEX::HLE::SignalDelegator* SignalDelegation)
ThreadManager(FEXCore::Context::Context* CTX, FEX::HLE::SyscallHandler* SyscallHandler, FEX::HLE::SignalDelegator* SignalDelegation)
: CTX {CTX}
, SyscallHandler {SyscallHandler}
, SignalDelegation {SignalDelegation} {}

~ThreadManager();
Expand Down Expand Up @@ -174,6 +175,7 @@ class ThreadManager final {

private:
FEXCore::Context::Context* CTX;
FEX::HLE::SyscallHandler* SyscallHandler;
FEX::HLE::SignalDelegator* SignalDelegation;

FEXCore::ForkableUniqueMutex ThreadCreationMutex;
Expand Down

0 comments on commit 121af75

Please sign in to comment.