| | |
| | | /* |
| | | Simple DirectMedia Layer |
| | | Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org> |
| | | Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> |
| | | |
| | | This software is provided 'as-is', without any express or implied |
| | | warranty. In no event will the authors be held liable for any damages |
| | |
| | | */ |
| | | #include "../SDL_internal.h" |
| | | |
| | | #ifndef _SDL_thread_c_h |
| | | #define _SDL_thread_c_h |
| | | #ifndef SDL_thread_c_h_ |
| | | #define SDL_thread_c_h_ |
| | | |
| | | #include "SDL_thread.h" |
| | | |
| | |
| | | unsigned int limit; |
| | | struct { |
| | | void *data; |
| | | void (*destructor)(void*); |
| | | void (SDLCALL *destructor)(void*); |
| | | } array[1]; |
| | | } SDL_TLSData; |
| | | |
| | |
| | | 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(); |
| | | extern SDL_TLSData *SDL_Generic_GetTLSData(void); |
| | | |
| | | /* Set cross-platform, slow, thread local storage for this thread. |
| | | This is only intended as a fallback if getting real thread-local |
| | |
| | | */ |
| | | extern int SDL_Generic_SetTLSData(SDL_TLSData *data); |
| | | |
| | | #endif /* _SDL_thread_c_h */ |
| | | #endif /* SDL_thread_c_h_ */ |
| | | |
| | | /* vi: set ts=4 sw=4 expandtab: */ |