kernel: It builds

This commit is contained in:
IndecisiveTurtle 2024-10-19 19:23:03 +03:00
parent c878e69270
commit 00b84b2c7f
43 changed files with 420 additions and 739 deletions

View file

@ -12,7 +12,7 @@ class CodeGenerator;
namespace Core {
union DtvEntry {
size_t counter;
std::size_t counter;
u8* pointer;
};
@ -33,4 +33,13 @@ void SetTcbBase(void* image_address);
/// Retrieves Tcb structure for the calling thread.
Tcb* GetTcbBase();
/// Makes sure TLS is initialized for the thread before entering guest.
void EnsureThreadInitialized();
template <class ReturnType, class... FuncArgs, class... CallArgs>
ReturnType ExecuteGuest(PS4_SYSV_ABI ReturnType (*func)(FuncArgs...), CallArgs&&... args) {
EnsureThreadInitialized();
return func(std::forward<CallArgs>(args)...);
}
} // namespace Core