mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-06 01:46:25 +00:00
threads: Move SDL's own thread creation to a new internal API.
This allows us to set an explicit stack size (overriding the system default and the global hint an app might have set), and remove all the macro salsa for dealing with _beginthreadex and such, as internal threads always set those to NULL anyhow. I've taken some guesses on reasonable (and tiny!) stack sizes for our internal threads, but some of these might turn out to be too small in practice and need an increase. Most of them are simple functions, though.
This commit is contained in:
@@ -60,6 +60,11 @@ extern SDL_TLSData *SDL_SYS_GetTLSData();
|
||||
/* Set the thread local storage for this thread */
|
||||
extern int SDL_SYS_SetTLSData(SDL_TLSData *data);
|
||||
|
||||
/* This is for internal SDL use, so we don't need #ifdefs everywhere. */
|
||||
extern SDL_Thread *
|
||||
SDL_CreateThreadInternal(int (SDLCALL * fn) (void *), const char *name,
|
||||
const size_t stacksize, void *data);
|
||||
|
||||
#endif /* _SDL_systhread_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
Reference in New Issue
Block a user