include/SDL_thread.h
changeset 4866 f42e8db53f78
parent 4468 82f357a91d43
child 5062 e8916fe9cfc8
     1.1 --- a/include/SDL_thread.h	Mon Aug 23 23:44:28 2010 -0700
     1.2 +++ b/include/SDL_thread.h	Sat Aug 28 22:56:52 2010 -0700
     1.3 @@ -50,6 +50,11 @@
     1.4  /* The SDL thread ID */
     1.5  typedef unsigned long SDL_threadID;
     1.6  
     1.7 +/* The function passed to SDL_CreateThread()
     1.8 +   It is passed a void* user context parameter and returns an int.
     1.9 + */
    1.10 +typedef int (SDLCALL * SDL_ThreadFunction) (void *data);
    1.11 +
    1.12  #if defined(__WIN32__) && !defined(HAVE_LIBC)
    1.13  /**
    1.14   *  \file SDL_thread.h
    1.15 @@ -100,7 +105,7 @@
    1.16   *  Create a thread.
    1.17   */
    1.18  extern DECLSPEC SDL_Thread *SDLCALL
    1.19 -SDL_CreateThread(int (SDLCALL * f) (void *), void *data,
    1.20 +SDL_CreateThread(SDL_ThreadFunction fn, void *data,
    1.21                   pfnSDL_CurrentBeginThread pfnBeginThread,
    1.22                   pfnSDL_CurrentEndThread pfnEndThread);
    1.23  
    1.24 @@ -125,7 +130,7 @@
    1.25   *  Create a thread.
    1.26   */
    1.27  extern DECLSPEC SDL_Thread *SDLCALL
    1.28 -SDL_CreateThread(int (SDLCALL * fn) (void *), void *data);
    1.29 +SDL_CreateThread(SDL_ThreadFunction fn, void *data);
    1.30  
    1.31  #endif
    1.32