Mercurial > sdl-ios-xcode
comparison src/thread/SDL_thread.c @ 1402:d910939febfa
Use consistent identifiers for the various platforms we support.
Make sure every source file includes SDL_config.h, so the proper system
headers are chosen.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 21 Feb 2006 08:46:50 +0000 |
parents | c71e05b4dc2e |
children | 9fb0eee04dd9 |
comparison
equal
deleted
inserted
replaced
1401:1819fd069e89 | 1402:d910939febfa |
---|---|
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
18 | 18 |
19 Sam Lantinga | 19 Sam Lantinga |
20 slouken@libsdl.org | 20 slouken@libsdl.org |
21 */ | 21 */ |
22 #include "SDL_config.h" | |
22 | 23 |
23 /* System independent thread management routines for SDL */ | 24 /* System independent thread management routines for SDL */ |
24 | 25 |
25 #include "SDL_mutex.h" | 26 #include "SDL_mutex.h" |
26 #include "SDL_thread.h" | 27 #include "SDL_thread.h" |
206 | 207 |
207 /* Run the function */ | 208 /* Run the function */ |
208 *statusloc = userfunc(userdata); | 209 *statusloc = userfunc(userdata); |
209 } | 210 } |
210 | 211 |
211 #if defined(_WIN32) || defined(__OS2__) | 212 #if defined(__WIN32__) || defined(__OS2__) |
212 #undef SDL_CreateThread | 213 #undef SDL_CreateThread |
213 DECLSPEC SDL_Thread * SDLCALL SDL_CreateThread(int (*fn)(void *), void *data, pfnSDL_CurrentBeginThread pfnBeginThread, pfnSDL_CurrentEndThread pfnEndThread) | 214 DECLSPEC SDL_Thread * SDLCALL SDL_CreateThread(int (*fn)(void *), void *data, pfnSDL_CurrentBeginThread pfnBeginThread, pfnSDL_CurrentEndThread pfnEndThread) |
214 #else | 215 #else |
215 DECLSPEC SDL_Thread * SDLCALL SDL_CreateThread(int (*fn)(void *), void *data) | 216 DECLSPEC SDL_Thread * SDLCALL SDL_CreateThread(int (*fn)(void *), void *data) |
216 #endif | 217 #endif |
247 | 248 |
248 /* Add the thread to the list of available threads */ | 249 /* Add the thread to the list of available threads */ |
249 SDL_AddThread(thread); | 250 SDL_AddThread(thread); |
250 | 251 |
251 /* Create the thread and go! */ | 252 /* Create the thread and go! */ |
252 #if defined(_WIN32) || defined(__OS2__) | 253 #if defined(__WIN32__) || defined(__OS2__) |
253 ret = SDL_SYS_CreateThread(thread, args, pfnBeginThread, pfnEndThread); | 254 ret = SDL_SYS_CreateThread(thread, args, pfnBeginThread, pfnEndThread); |
254 #else | 255 #else |
255 ret = SDL_SYS_CreateThread(thread, args); | 256 ret = SDL_SYS_CreateThread(thread, args); |
256 #endif | 257 #endif |
257 if ( ret >= 0 ) { | 258 if ( ret >= 0 ) { |