OS/2 port!

This was mostly, if not entirely, written by "Doodle" and "Caetano":
    doodle@scenergy.dfmk.hu
    daniel@caetano.eng.br

--ryan.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401193
This commit is contained in:
Ryan C. Gordon 2005-11-23 07:29:56 +00:00
parent c154edb92f
commit b08452cb40
49 changed files with 6571 additions and 8 deletions

View file

@ -218,7 +218,11 @@ void SDL_RunThread(void *data)
*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_Thread *SDL_CreateThread(int (*fn)(void *), void *data)
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);