mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-31 17:07:39 +00:00
Added TLS initialization and shutdown functions
Fixes https://github.com/libsdl-org/SDL/issues/8576
This commit is contained in:
parent
f0ceb92dca
commit
b517043936
8 changed files with 171 additions and 67 deletions
|
@ -89,16 +89,16 @@ typedef struct
|
|||
/* This is how many TLS entries we allocate at once */
|
||||
#define TLS_ALLOC_CHUNKSIZE 4
|
||||
|
||||
/* Get cross-platform, slow, thread local storage for this thread.
|
||||
This is only intended as a fallback if getting real thread-local
|
||||
storage fails or isn't supported on this platform.
|
||||
*/
|
||||
extern SDL_TLSData *SDL_Generic_GetTLSData(void);
|
||||
extern void SDL_InitTLSData(void);
|
||||
extern void SDL_QuitTLSData(void);
|
||||
|
||||
/* Set cross-platform, slow, thread local storage for this thread.
|
||||
/* Generic TLS support.
|
||||
This is only intended as a fallback if getting real thread-local
|
||||
storage fails or isn't supported on this platform.
|
||||
*/
|
||||
extern void SDL_Generic_InitTLSData(void);
|
||||
extern SDL_TLSData *SDL_Generic_GetTLSData(void);
|
||||
extern int SDL_Generic_SetTLSData(SDL_TLSData *data);
|
||||
extern void SDL_Generic_QuitTLSData(void);
|
||||
|
||||
#endif /* SDL_thread_c_h_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue