comparison src/thread/os2/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
49 49
50 // Get the current endthread we have to use! 50 // Get the current endthread we have to use!
51 if (pThreadParms) 51 if (pThreadParms)
52 { 52 {
53 pfnCurrentEndThread = pThreadParms->pfnCurrentEndThread; 53 pfnCurrentEndThread = pThreadParms->pfnCurrentEndThread;
54 free(pThreadParms); 54 SDL_free(pThreadParms);
55 } 55 }
56 // Call endthread! 56 // Call endthread!
57 if (pfnCurrentEndThread) 57 if (pfnCurrentEndThread)
58 (*pfnCurrentEndThread)(); 58 (*pfnCurrentEndThread)();
59 } 59 }
60 60
61 int SDL_SYS_CreateThread(SDL_Thread *thread, void *args, pfnSDL_CurrentBeginThread pfnBeginThread, pfnSDL_CurrentEndThread pfnEndThread) 61 int SDL_SYS_CreateThread(SDL_Thread *thread, void *args, pfnSDL_CurrentBeginThread pfnBeginThread, pfnSDL_CurrentEndThread pfnEndThread)
62 { 62 {
63 pThreadStartParms pThreadParms = malloc(sizeof(tThreadStartParms)); 63 pThreadStartParms pThreadParms = SDL_malloc(sizeof(tThreadStartParms));
64 if (!pThreadParms) 64 if (!pThreadParms)
65 { 65 {
66 SDL_SetError("Not enough memory to create thread"); 66 SDL_SetError("Not enough memory to create thread");
67 return(-1); 67 return(-1);
68 } 68 }