diff src/thread/SDL_thread.c @ 1190:173c063d4f55

OS/2 port! This was mostly, if not entirely, written by "Doodle" and "Caetano": doodle@scenergy.dfmk.hu daniel@caetano.eng.br --ryan.
author Ryan C. Gordon <icculus@icculus.org>
date Wed, 23 Nov 2005 07:29:56 +0000
parents b8d311d90021
children c9b51268668f
line wrap: on
line diff
--- a/src/thread/SDL_thread.c	Wed Nov 23 07:23:48 2005 +0000
+++ b/src/thread/SDL_thread.c	Wed Nov 23 07:29:56 2005 +0000
@@ -218,7 +218,11 @@
 	*statusloc = userfunc(userdata);
 }
 
-SDL_Thread *SDL_CreateThread(int (*fn)(void *), void *data)
+#ifdef __OS2__
+DECLSPEC SDL_Thread * SDLCALL SDL_CreateThread_Core(int (*fn)(void *), void *data, pfnSDL_CurrentBeginThread pfnBeginThread, pfnSDL_CurrentEndThread pfnEndThread)
+#else
+DECLSPEC SDL_Thread * SDLCALL SDL_CreateThread(int (*fn)(void *), void *data)
+#endif
 {
 	SDL_Thread *thread;
 	thread_args *args;
@@ -254,7 +258,11 @@
 	SDL_AddThread(thread);
 
 	/* Create the thread and go! */
+#ifdef __OS2__
+        ret = SDL_SYS_CreateThread(thread, args, pfnBeginThread, pfnEndThread);
+#else
 	ret = SDL_SYS_CreateThread(thread, args);
+#endif
 	if ( ret >= 0 ) {
 		/* Wait for the thread function to use arguments */
 		SDL_SemWait(args->wait);