mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-23 19:48:29 +00:00
threads: Handle SDL_HINT_THREAD_STACK_SIZE at top level, implement elsewhere.
This commit is contained in:
@@ -59,6 +59,7 @@ struct SDL_Thread
|
||||
SDL_atomic_t state; /* SDL_THREAD_STATE_* */
|
||||
SDL_error errbuf;
|
||||
char *name;
|
||||
size_t stacksize; /* 0 for default, >0 for user-specified stack size. */
|
||||
void *data;
|
||||
};
|
||||
|
||||
@@ -89,6 +90,19 @@ extern SDL_TLSData *SDL_Generic_GetTLSData();
|
||||
*/
|
||||
extern int SDL_Generic_SetTLSData(SDL_TLSData *data);
|
||||
|
||||
/* !!! FIXME: for 2.1, remove this and make stack size part of SDL_CreateThread. */
|
||||
#ifdef SDL_PASSED_BEGINTHREAD_ENDTHREAD
|
||||
SDL_Thread *SDLCALL
|
||||
SDL_CreateThreadWithStackSize(int (SDLCALL * fn) (void *),
|
||||
const char *name, const size_t stacksize, void *data,
|
||||
pfnSDL_CurrentBeginThread pfnBeginThread,
|
||||
pfnSDL_CurrentEndThread pfnEndThread)
|
||||
#else
|
||||
SDL_Thread *SDLCALL
|
||||
SDL_CreateThreadWithStackSize(int (SDLCALL * fn) (void *),
|
||||
const char *name, const size_t stacksize, void *data)
|
||||
#endif
|
||||
|
||||
#endif /* _SDL_thread_c_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
Reference in New Issue
Block a user