# HG changeset patch # User Sam Lantinga # Date 1283061412 25200 # Node ID f42e8db53f78841321778dbf802b43765c22c584 # Parent fff50e86c8919a9840e30ed99e89d01e04323a17 Added a typedef for the thread function to simplify documentation diff -r fff50e86c891 -r f42e8db53f78 include/SDL_thread.h --- a/include/SDL_thread.h Mon Aug 23 23:44:28 2010 -0700 +++ b/include/SDL_thread.h Sat Aug 28 22:56:52 2010 -0700 @@ -50,6 +50,11 @@ /* The SDL thread ID */ typedef unsigned long SDL_threadID; +/* The function passed to SDL_CreateThread() + It is passed a void* user context parameter and returns an int. + */ +typedef int (SDLCALL * SDL_ThreadFunction) (void *data); + #if defined(__WIN32__) && !defined(HAVE_LIBC) /** * \file SDL_thread.h @@ -100,7 +105,7 @@ * Create a thread. */ extern DECLSPEC SDL_Thread *SDLCALL -SDL_CreateThread(int (SDLCALL * f) (void *), void *data, +SDL_CreateThread(SDL_ThreadFunction fn, void *data, pfnSDL_CurrentBeginThread pfnBeginThread, pfnSDL_CurrentEndThread pfnEndThread); @@ -125,7 +130,7 @@ * Create a thread. */ extern DECLSPEC SDL_Thread *SDLCALL -SDL_CreateThread(int (SDLCALL * fn) (void *), void *data); +SDL_CreateThread(SDL_ThreadFunction fn, void *data); #endif