Merge pull request #3594 from lioncash/threads-a-joke-about
Core: Use the thread_local keyword
This commit is contained in:
commit
a97a546bd6
|
@ -73,15 +73,11 @@
|
||||||
#include "VideoCommon/RenderBase.h"
|
#include "VideoCommon/RenderBase.h"
|
||||||
#include "VideoCommon/VideoBackendBase.h"
|
#include "VideoCommon/VideoBackendBase.h"
|
||||||
|
|
||||||
// This can mostly be removed when we move to VS2015
|
// Android and OSX haven't implemented the keyword yet.
|
||||||
// to use the thread_local keyword
|
#if defined __ANDROID__ || defined __APPLE__
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define ThreadLocalStorage __declspec(thread)
|
|
||||||
#elif defined __ANDROID__ || defined __APPLE__
|
|
||||||
// This will most likely have to stay, to support android
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#else // Everything besides VS and Android
|
#else // Everything besides OSX and Android
|
||||||
#define ThreadLocalStorage __thread
|
#define ThreadLocalStorage thread_local
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace Core
|
namespace Core
|
||||||
|
|
Loading…
Reference in New Issue