SDL Wiki
(This is the legacy documentation for SDL2, the previous stable version; SDL3 is the current stable version.)

SDL_CreateThread

Create a new thread with a default stack size.

Header File

Defined in SDL_thread.h

Syntax

extern DECLSPEC SDL_Thread *SDLCALL
SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data);

Function Parameters

SDL_ThreadFunction fn the SDL_ThreadFunction function to call in the new thread.
const char * name the name of the thread.
void * data a pointer that is passed to fn.

Return Value

(SDL_Thread *) 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.

Remarks

This is equivalent to calling:

SDL_CreateThreadWithStackSize(fn, name, 0, data);

Version

This function is available since SDL 2.0.0.

See Also


CategoryAPI, CategoryAPIFunction, CategoryThread


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.