src/thread/SDL_thread_c.h
changeset 7393 358696c354a8
parent 7011 82bbfbbc720e
child 7482 249d8ecbbb7d
equal deleted inserted replaced
7392:7e32fcb41b44 7393:358696c354a8
    54 };
    54 };
    55 
    55 
    56 /* This is the function called to run a thread */
    56 /* This is the function called to run a thread */
    57 extern void SDL_RunThread(void *data);
    57 extern void SDL_RunThread(void *data);
    58 
    58 
       
    59 /* This is the system-independent thread local storage structure */
       
    60 typedef struct {
       
    61     int limit;
       
    62     struct {
       
    63         void *data;
       
    64         void (*destructor)(void*);
       
    65     } array[1];
       
    66 } SDL_TLSData;
       
    67 
       
    68 /* This is how many TLS entries we allocate at once */
       
    69 #define TLS_ALLOC_CHUNKSIZE 4
       
    70 
       
    71 /* Get cross-platform, slow, thread local storage for this thread.
       
    72    This is only intended as a fallback if getting real thread-local
       
    73    storage fails or isn't supported on this platform.
       
    74  */
       
    75 extern SDL_TLSData *SDL_Generic_GetTLSData();
       
    76 
       
    77 /* Set cross-platform, slow, thread local storage for this thread.
       
    78    This is only intended as a fallback if getting real thread-local
       
    79    storage fails or isn't supported on this platform.
       
    80  */
       
    81 extern int SDL_Generic_SetTLSData(SDL_TLSData *data);
       
    82 
    59 #endif /* _SDL_thread_c_h */
    83 #endif /* _SDL_thread_c_h */
    60 
    84 
    61 /* vi: set ts=4 sw=4 expandtab: */
    85 /* vi: set ts=4 sw=4 expandtab: */