GetSupportsTLS/SetSupportsTLS
This commit is contained in:
@@ -30,6 +30,9 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Assume TLS doesn't work until told otherwise. It's ArchHooks's job to set this. */
|
||||||
|
bool RageThread::m_bSystemSupportsTLS = false;
|
||||||
|
|
||||||
#define MAX_THREADS 128
|
#define MAX_THREADS 128
|
||||||
//static vector<RageMutex*> *g_MutexList = NULL; /* watch out for static initialization order problems */
|
//static vector<RageMutex*> *g_MutexList = NULL; /* watch out for static initialization order problems */
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ class RageThread
|
|||||||
ThreadSlot *m_pSlot;
|
ThreadSlot *m_pSlot;
|
||||||
CString name;
|
CString name;
|
||||||
|
|
||||||
|
static bool m_bSystemSupportsTLS;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RageThread();
|
RageThread();
|
||||||
~RageThread();
|
~RageThread();
|
||||||
@@ -28,6 +30,13 @@ public:
|
|||||||
static bool EnumThreadIDs( int n, uint64_t &iID );
|
static bool EnumThreadIDs( int n, uint64_t &iID );
|
||||||
int Wait();
|
int Wait();
|
||||||
bool IsCreated() const { return m_pSlot != NULL; }
|
bool IsCreated() const { return m_pSlot != NULL; }
|
||||||
|
|
||||||
|
/* A system can define HAVE_TLS, indicating that it can compile thread_local
|
||||||
|
* code, but an individual environment may not actually have functional TLS.
|
||||||
|
* If this returns false, thread_local variables are considered undefined. */
|
||||||
|
static bool GetSupportsTLS() { return m_bSystemSupportsTLS; }
|
||||||
|
|
||||||
|
static void SetSupportsTLS( bool b ) { m_bSystemSupportsTLS = b; }
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace Checkpoints
|
namespace Checkpoints
|
||||||
|
|||||||
Reference in New Issue
Block a user