[Build] Generalize POSIX platform guards
Most non-Windows code paths use standard POSIX APIs (sockets, signals, dlopen, threading) that work on any POSIX platform. Change Linux-specific guards to !WIN32 or #else where the code is portable. Linux-specific APIs (SIGRTMIN, Vulkan/X11, fontconfig/GTK) remain Linux-guarded.
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "xenia/base/mutex.h"
|
||||
#if XE_PLATFORM_LINUX
|
||||
#if !XE_PLATFORM_WIN32
|
||||
#include <condition_variable>
|
||||
#include <csignal>
|
||||
#include <mutex>
|
||||
@@ -343,7 +343,7 @@ struct X_KTHREAD {
|
||||
};
|
||||
static_assert_size(X_KTHREAD, 0xAB0);
|
||||
|
||||
#if XE_PLATFORM_LINUX
|
||||
#if !XE_PLATFORM_WIN32
|
||||
// Exception thrown by XThread::Reenter() to unwind through JIT frames.
|
||||
// C++ exception unwinding uses DWARF .eh_frame info registered for JIT code,
|
||||
// ensuring destructors and RAII guards in host C++ frames are properly called.
|
||||
@@ -442,7 +442,7 @@ class XThread : public XObject, public cpu::Thread {
|
||||
X_STATUS Delay(uint32_t processor_mode, uint32_t alertable,
|
||||
uint64_t interval);
|
||||
|
||||
#if XE_PLATFORM_LINUX
|
||||
#if !XE_PLATFORM_WIN32
|
||||
// Performs self-suspension: increments suspend_count and blocks until
|
||||
// another thread calls Resume() and suspend_count reaches 0.
|
||||
// Returns the previous suspend_count value.
|
||||
@@ -490,7 +490,7 @@ class XThread : public XObject, public cpu::Thread {
|
||||
|
||||
int32_t priority_ = 0;
|
||||
|
||||
#if XE_PLATFORM_LINUX
|
||||
#if !XE_PLATFORM_WIN32
|
||||
// Condition variable for thread self-suspension.
|
||||
std::mutex suspend_mutex_;
|
||||
std::condition_variable suspend_cv_;
|
||||
|
||||
Reference in New Issue
Block a user