mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-02 19:08:03 -06:00
proper %gs tls for once
This commit is contained in:
parent
85ecb7942f
commit
46f79192f7
@ -10,6 +10,8 @@
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#elif defined(__FreeBSD__)
|
||||
#include <machine/sysarch.h>
|
||||
#elif defined(__APPLE__) && defined(ARCH_X86_64)
|
||||
#include <architecture/i386/table.h>
|
||||
#include <boost/icl/interval_set.hpp>
|
||||
@ -168,6 +170,17 @@ Tcb* GetTcbBase() {
|
||||
return Libraries::Kernel::g_curthread->tcb;
|
||||
}
|
||||
|
||||
#elif defined(__FreeBSD__)
|
||||
void SetTcbBase(void* image_address) {
|
||||
amd64_set_gsbase(image_address);
|
||||
}
|
||||
|
||||
Tcb* GetTcbBase() {
|
||||
void *addr = nullptr;
|
||||
amd64_get_gsbase(&addr);
|
||||
return static_cast<Tcb*>(addr);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
// POSIX non-x86_64
|
||||
|
||||
Loading…
Reference in New Issue
Block a user