Function SDL_CreateThreadRuntime
pub unsafe extern "C" fn SDL_CreateThreadRuntime(
fn: Option<unsafe extern "C" fn(_: *mut c_void) -> i32>,
name: *const i8,
data: *mut c_void,
pfnBeginThread: Option<unsafe extern "C" fn()>,
pfnEndThread: Option<unsafe extern "C" fn()>,
) -> *mut SDL_Thread
Available on crate feature
dep_sdl3
only.Expand description
The actual entry point for SDL_CreateThread
.
§Parameters
fn
: theSDL_ThreadFunction
function to call in the new threadname
: the name of the threaddata
: a pointer that is passed tofn
pfnBeginThread
: the C runtime’s _beginthreadex (or whatnot). Can be NULL.pfnEndThread
: the C runtime’s _endthreadex (or whatnot). Can be NULL.
§Return value
Returns an opaque pointer to the new thread object on success, NULL if the
new thread could not be created; call SDL_GetError()
for more
information.
§Availability
This function is available since SDL 3.2.0.