mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-09 16:00:20 +02:00
Whole-tree reformat
This follows discussions from #3413. Followup commits add clang-format file, script and blame ignore lists.
This commit is contained in:
1 parent
028c220041
commit
2b4ec88dae
447 files changed
+78590
-73070
No files matched your search
@@ -18,47 +18,43 @@
|
||||
#endif
|
||||
|
||||
namespace FEXCore::Threads {
|
||||
fextl::unique_ptr<FEXCore::Threads::Thread> CreateThread_Default(
|
||||
ThreadFunc Func,
|
||||
void* Arg) {
|
||||
ERROR_AND_DIE_FMT("Frontend didn't setup thread creation!");
|
||||
}
|
||||
fextl::unique_ptr<FEXCore::Threads::Thread> CreateThread_Default(ThreadFunc Func, void* Arg) {
|
||||
ERROR_AND_DIE_FMT("Frontend didn't setup thread creation!");
|
||||
}
|
||||
|
||||
void CleanupAfterFork_Default() {
|
||||
ERROR_AND_DIE_FMT("Frontend didn't setup thread creation!");
|
||||
}
|
||||
void CleanupAfterFork_Default() {
|
||||
ERROR_AND_DIE_FMT("Frontend didn't setup thread creation!");
|
||||
}
|
||||
|
||||
static FEXCore::Threads::Pointers Ptrs = {
|
||||
.CreateThread = CreateThread_Default,
|
||||
.CleanupAfterFork = CleanupAfterFork_Default,
|
||||
};
|
||||
static FEXCore::Threads::Pointers Ptrs = {
|
||||
.CreateThread = CreateThread_Default,
|
||||
.CleanupAfterFork = CleanupAfterFork_Default,
|
||||
};
|
||||
|
||||
fextl::unique_ptr<FEXCore::Threads::Thread> FEXCore::Threads::Thread::Create(
|
||||
ThreadFunc Func,
|
||||
void* Arg) {
|
||||
return Ptrs.CreateThread(Func, Arg);
|
||||
}
|
||||
fextl::unique_ptr<FEXCore::Threads::Thread> FEXCore::Threads::Thread::Create(ThreadFunc Func, void* Arg) {
|
||||
return Ptrs.CreateThread(Func, Arg);
|
||||
}
|
||||
|
||||
void FEXCore::Threads::Thread::CleanupAfterFork() {
|
||||
return Ptrs.CleanupAfterFork();
|
||||
}
|
||||
void FEXCore::Threads::Thread::CleanupAfterFork() {
|
||||
return Ptrs.CleanupAfterFork();
|
||||
}
|
||||
|
||||
void FEXCore::Threads::Thread::SetInternalPointers(Pointers const &_Ptrs) {
|
||||
memcpy(&Ptrs, &_Ptrs, sizeof(FEXCore::Threads::Pointers));
|
||||
}
|
||||
void FEXCore::Threads::Thread::SetInternalPointers(const Pointers& _Ptrs) {
|
||||
memcpy(&Ptrs, &_Ptrs, sizeof(FEXCore::Threads::Pointers));
|
||||
}
|
||||
|
||||
uint64_t SetSignalMask(uint64_t Mask) {
|
||||
uint64_t SetSignalMask(uint64_t Mask) {
|
||||
#ifndef _WIN32
|
||||
::syscall(SYS_rt_sigprocmask, SIG_SETMASK, &Mask, &Mask, 8);
|
||||
return Mask;
|
||||
::syscall(SYS_rt_sigprocmask, SIG_SETMASK, &Mask, &Mask, 8);
|
||||
return Mask;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void SetThreadName(const char *name) {
|
||||
void SetThreadName(const char* name) {
|
||||
#ifndef _WIN32
|
||||
pthread_setname_np(pthread_self(), name);
|
||||
#else
|
||||
// TODO:
|
||||
#endif
|
||||
}
|
||||
}
|
||||
} // namespace FEXCore::Threads
|
||||
Reference in new issue
Block a user