[Commits] SDL: SDL_thread.h: add missing os/2 defines.

libsdl.org revision control commits-owner at libsdl.org
Mon Aug 21 13:01:27 PDT 2017


details:   https://hg.libsdl.org/SDL/rev/97cd834a843e
changeset: 11340:97cd834a843e
user:      Sam Lantinga <slouken at libsdl.org>
date:      Mon Aug 21 13:01:22 2017 -0700
description:
SDL_thread.h: add missing os/2 defines.

(essentially replicates the windows case || SDL1.2 case.)

diffstat:

 include/SDL_thread.h |  13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diffs (23 lines):

diff -r a6da0a386f68 -r 97cd834a843e include/SDL_thread.h
--- a/include/SDL_thread.h	Mon Aug 21 13:00:58 2017 -0700
+++ b/include/SDL_thread.h	Mon Aug 21 13:01:22 2017 -0700
@@ -118,6 +118,19 @@
 #define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)
 #endif
 
+#elif defined(__OS2__)
+
+/*
+ * just like the windows case above:  We compile SDL2
+ * into a dll with Watcom's runtime statically linked.
+ */
+#define SDL_PASSED_BEGINTHREAD_ENDTHREAD
+#include <process.h>
+typedef int (*pfnSDL_CurrentBeginThread)(void (*func)(void *), void *, unsigned, void *arg);
+typedef void (*pfnSDL_CurrentEndThread)(void);
+#undef SDL_CreateThread
+#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread)
+
 #else
 
 /**


More information about the commits mailing list