Mercurial > sdl-ios-xcode
comparison src/thread/win32/SDL_systhread.c @ 1336:3692456e7b0f
Use SDL_ prefixed versions of C library functions.
FIXME:
Change #include <stdlib.h> to #include "SDL_stdlib.h"
Change #include <string.h> to #include "SDL_string.h"
Make sure nothing else broke because of this...
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 07 Feb 2006 06:59:48 +0000 |
parents | 450721ad5436 |
children | 604d73db6802 |
comparison
equal
deleted
inserted
replaced
1335:c39265384763 | 1336:3692456e7b0f |
---|---|
45 | 45 |
46 // Get the current endthread we have to use! | 46 // Get the current endthread we have to use! |
47 if (pThreadParms) | 47 if (pThreadParms) |
48 { | 48 { |
49 pfnCurrentEndThread = pThreadParms->pfnCurrentEndThread; | 49 pfnCurrentEndThread = pThreadParms->pfnCurrentEndThread; |
50 free(pThreadParms); | 50 SDL_free(pThreadParms); |
51 } | 51 } |
52 // Call endthread! | 52 // Call endthread! |
53 if (pfnCurrentEndThread) | 53 if (pfnCurrentEndThread) |
54 (*pfnCurrentEndThread)(0); | 54 (*pfnCurrentEndThread)(0); |
55 return(0); | 55 return(0); |
56 } | 56 } |
57 | 57 |
58 int SDL_SYS_CreateThread(SDL_Thread *thread, void *args, pfnSDL_CurrentBeginThread pfnBeginThread, pfnSDL_CurrentEndThread pfnEndThread) | 58 int SDL_SYS_CreateThread(SDL_Thread *thread, void *args, pfnSDL_CurrentBeginThread pfnBeginThread, pfnSDL_CurrentEndThread pfnEndThread) |
59 { | 59 { |
60 unsigned threadid; | 60 unsigned threadid; |
61 pThreadStartParms pThreadParms = (pThreadStartParms)malloc(sizeof(tThreadStartParms)); | 61 pThreadStartParms pThreadParms = (pThreadStartParms)SDL_malloc(sizeof(tThreadStartParms)); |
62 if (!pThreadParms) { | 62 if (!pThreadParms) { |
63 SDL_OutOfMemory(); | 63 SDL_OutOfMemory(); |
64 return(-1); | 64 return(-1); |
65 } | 65 } |
66 | 66 |