include/SDL_thread.h
changeset 7393 358696c354a8
parent 7391 a29895dc5e9a
child 7418 5689b9b47f8c
     1.1 --- a/include/SDL_thread.h	Wed Jul 10 02:37:57 2013 -0700
     1.2 +++ b/include/SDL_thread.h	Wed Jul 10 18:31:17 2013 -0700
     1.3 @@ -48,8 +48,8 @@
     1.4  /* The SDL thread ID */
     1.5  typedef unsigned long SDL_threadID;
     1.6  
     1.7 -/* Thread local storage ID */
     1.8 -typedef int SDL_TLSID;
     1.9 +/* Thread local storage ID, 0 is the invalid ID */
    1.10 +typedef unsigned SDL_TLSID;
    1.11  
    1.12  /* The SDL thread priority
    1.13   *
    1.14 @@ -219,13 +219,14 @@
    1.15   *
    1.16   *  \param id The thread local storage ID
    1.17   *  \param value The value to associate with the ID for the current thread
    1.18 + *  \param destructor A function called when the thread exits, to free the value.
    1.19   *
    1.20   *  \return 0 on success, -1 on error
    1.21   *
    1.22   *  \sa SDL_TLSCreate()
    1.23   *  \sa SDL_TLSGet()
    1.24   */
    1.25 -extern DECLSPEC int SDLCALL SDL_TLSSet(SDL_TLSID id, const void *value);
    1.26 +extern DECLSPEC int SDLCALL SDL_TLSSet(SDL_TLSID id, const void *value, void (*destructor)(void*));
    1.27  
    1.28  
    1.29  /* Ends C function definitions when using C++ */