Function sdl2_sys::SDL_TLSSet
source · pub unsafe extern "C" fn SDL_TLSSet(
id: SDL_TLSID,
value: *const c_void,
destructor: Option<unsafe extern "C" fn(arg1: *mut c_void)>,
) -> c_int
Expand description
Set the current thread’s value associated with a thread local storage ID.
The function prototype for destructor
is:
void destructor(void *value)
where its parameter value
is what was passed as value
to SDL_TLSSet().
\param id the thread local storage ID \param value the value to associate with the ID for the current thread \param destructor a function called when the thread exits, to free the value \returns 0 on success or a negative error code on failure; call SDL_GetError() for more information.
\since This function is available since SDL 2.0.0.
\sa SDL_TLSCreate \sa SDL_TLSGet