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: the SDL_ThreadFunction function to call in the new thread
  • name: the name of the thread
  • data: a pointer that is passed to fn
  • 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.