Util: Allow disabling the threading code entirely
Jeffrey Pfau jeffrey@endrift.com
Wed, 03 Jun 2015 20:37:45 -0700
3 files changed,
6 insertions(+),
1 deletions(-)
M
CHANGES
→
CHANGES
@@ -58,6 +58,7 @@ - Qt: Fix windows being resizable when they shouldn't have been
- Qt: Only hide cursor in full screen - Perf: Ability to load savestates immediately on launch - Qt: Replace pause-after-frame mutex with an atomic + - Util: Allow disabling the threading code entirely 0.2.1: (2015-05-13) Bugfixes:
M
src/gba/supervisor/thread.c
→
src/gba/supervisor/thread.c
@@ -25,6 +25,7 @@ #include <signal.h>
static const float _defaultFPSTarget = 60.f; +#ifndef DISABLE_THREADING #ifdef USE_PTHREADS static pthread_key_t _contextKey; static pthread_once_t _contextOnce = PTHREAD_ONCE_INIT;@@ -45,7 +46,6 @@ return TRUE;
} #endif -#ifndef DISABLE_THREADING static void _changeState(struct GBAThread* threadContext, enum ThreadState newState, bool broadcast) { MutexLock(&threadContext->stateMutex); threadContext->state = newState;
M
src/util/threading.h
→
src/util/threading.h
@@ -8,6 +8,7 @@ #define THREADING_H
#include "util/common.h" +#ifndef DISABLE_THREADING #ifdef USE_PTHREADS #include <pthread.h> #include <sys/time.h>@@ -144,6 +145,9 @@ return 0;
} #else #define DISABLE_THREADING +#endif +#endif +#ifdef DISABLE_THREADING typedef void* Thread; typedef void* Mutex; typedef void* Condition;