Scroll to navigation

SDL_CreateThread(3) SDL3 FUNCTIONS SDL_CreateThread(3)

NAME

SDL_CreateThread - Create a new thread with a default stack size.

SYNOPSIS

#include "SDL3/SDL.h"
SDL_Thread * SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data);

DESCRIPTION

This is equivalent to calling:

c SDL_CreateThreadWithStackSize(fn, name, 0, data);

FUNCTION PARAMETERS

the SDL_ThreadFunction
function to call in the new thread
the name of the thread
a pointer that is passed to fn

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.0.0.

SEE ALSO

SDL_CreateThreadWithStackSize(3), SDL_WaitThread(3)

SDL 3.1.0 SDL