mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-17 00:38:12 +00:00
Updated source to match SDL function prototype style
This commit is contained in:
@@ -26,8 +26,7 @@
|
||||
#include "SDL_systhread.h"
|
||||
#include "../SDL_error_c.h"
|
||||
|
||||
SDL_TLSID
|
||||
SDL_TLSCreate(void)
|
||||
SDL_TLSID SDL_TLSCreate(void)
|
||||
{
|
||||
static SDL_AtomicInt SDL_tls_id;
|
||||
return SDL_AtomicIncRef(&SDL_tls_id) + 1;
|
||||
@@ -112,8 +111,7 @@ typedef struct SDL_TLSEntry
|
||||
static SDL_Mutex *SDL_generic_TLS_mutex;
|
||||
static SDL_TLSEntry *SDL_generic_TLS;
|
||||
|
||||
SDL_TLSData *
|
||||
SDL_Generic_GetTLSData(void)
|
||||
SDL_TLSData *SDL_Generic_GetTLSData(void)
|
||||
{
|
||||
SDL_threadID thread = SDL_ThreadID();
|
||||
SDL_TLSEntry *entry;
|
||||
@@ -215,8 +213,7 @@ static void SDLCALL SDL_FreeErrBuf(void *data)
|
||||
#endif
|
||||
|
||||
/* Routine to get the thread-specific error variable */
|
||||
SDL_error *
|
||||
SDL_GetErrBuf(void)
|
||||
SDL_error *SDL_GetErrBuf(void)
|
||||
{
|
||||
#ifdef SDL_THREADS_DISABLED
|
||||
return SDL_GetStaticErrBuf();
|
||||
@@ -317,14 +314,12 @@ void SDL_RunThread(SDL_Thread *thread)
|
||||
#endif
|
||||
|
||||
#ifdef SDL_PASSED_BEGINTHREAD_ENDTHREAD
|
||||
SDL_Thread *
|
||||
SDL_CreateThreadWithStackSize(int(SDLCALL *fn)(void *),
|
||||
SDL_Thread *SDL_CreateThreadWithStackSize(int(SDLCALL *fn)(void *),
|
||||
const char *name, const size_t stacksize, void *data,
|
||||
pfnSDL_CurrentBeginThread pfnBeginThread,
|
||||
pfnSDL_CurrentEndThread pfnEndThread)
|
||||
#else
|
||||
SDL_Thread *
|
||||
SDL_CreateThreadWithStackSize(int(SDLCALL *fn)(void *),
|
||||
SDL_Thread *SDL_CreateThreadWithStackSize(int(SDLCALL *fn)(void *),
|
||||
const char *name, const size_t stacksize, void *data)
|
||||
#endif
|
||||
{
|
||||
@@ -372,14 +367,12 @@ SDL_CreateThreadWithStackSize(int(SDLCALL *fn)(void *),
|
||||
}
|
||||
|
||||
#ifdef SDL_PASSED_BEGINTHREAD_ENDTHREAD
|
||||
DECLSPEC SDL_Thread *SDLCALL
|
||||
SDL_CreateThread(int(SDLCALL *fn)(void *),
|
||||
DECLSPEC SDL_Thread *SDLCALL SDL_CreateThread(int(SDLCALL *fn)(void *),
|
||||
const char *name, void *data,
|
||||
pfnSDL_CurrentBeginThread pfnBeginThread,
|
||||
pfnSDL_CurrentEndThread pfnEndThread)
|
||||
#else
|
||||
DECLSPEC SDL_Thread *SDLCALL
|
||||
SDL_CreateThread(int(SDLCALL *fn)(void *),
|
||||
DECLSPEC SDL_Thread *SDLCALL SDL_CreateThread(int(SDLCALL *fn)(void *),
|
||||
const char *name, void *data)
|
||||
#endif
|
||||
{
|
||||
@@ -405,8 +398,7 @@ SDL_CreateThread(int(SDLCALL *fn)(void *),
|
||||
#endif
|
||||
}
|
||||
|
||||
SDL_Thread *
|
||||
SDL_CreateThreadInternal(int(SDLCALL *fn)(void *), const char *name,
|
||||
SDL_Thread *SDL_CreateThreadInternal(int(SDLCALL *fn)(void *), const char *name,
|
||||
const size_t stacksize, void *data)
|
||||
{
|
||||
#ifdef SDL_PASSED_BEGINTHREAD_ENDTHREAD
|
||||
@@ -416,8 +408,7 @@ SDL_CreateThreadInternal(int(SDLCALL *fn)(void *), const char *name,
|
||||
#endif
|
||||
}
|
||||
|
||||
SDL_threadID
|
||||
SDL_GetThreadID(SDL_Thread *thread)
|
||||
SDL_threadID SDL_GetThreadID(SDL_Thread *thread)
|
||||
{
|
||||
SDL_threadID id;
|
||||
|
||||
@@ -429,8 +420,7 @@ SDL_GetThreadID(SDL_Thread *thread)
|
||||
return id;
|
||||
}
|
||||
|
||||
const char *
|
||||
SDL_GetThreadName(SDL_Thread *thread)
|
||||
const char *SDL_GetThreadName(SDL_Thread *thread)
|
||||
{
|
||||
if (thread) {
|
||||
return thread->name;
|
||||
|
Reference in New Issue
Block a user