sdlGetThreadId function

int sdlGetThreadId(
  1. Pointer<SdlThread> thread
)

Get the thread identifier for the specified thread.

This thread identifier is as reported by the underlying operating system. If SDL is running on a platform that does not support threads the return value will always be zero.

\param thread the thread to query \returns the ID of the specified thread, or the ID of the current thread if thread is NULL.

\since This function is available since SDL 2.0.0.

\sa SDL_ThreadID

extern DECLSPEC SDL_threadID SDLCALL SDL_GetThreadID(SDL_Thread * thread)

Implementation

int sdlGetThreadId(Pointer<SdlThread> thread) {
  final sdlGetThreadIdLookupFunction = libSdl2.lookupFunction<
      Uint32 Function(Pointer<SdlThread> thread),
      int Function(Pointer<SdlThread> thread)>('SDL_GetThreadID');
  return sdlGetThreadIdLookupFunction(thread);
}