Updated source to match SDL function prototype style

This commit is contained in:
Sam Lantinga
2023-05-23 11:29:41 -07:00
parent 737aa881fa
commit ddbdd73258
173 changed files with 481 additions and 942 deletions

View File

@@ -34,8 +34,7 @@ struct SDL_Condition
};
/* Create a condition variable */
SDL_Condition *
SDL_CreateCondition(void)
SDL_Condition *SDL_CreateCondition(void)
{
SDL_Condition *cond;

View File

@@ -25,8 +25,7 @@
#include "SDL_sysmutex_c.h"
SDL_Mutex *
SDL_CreateMutex(void)
SDL_Mutex *SDL_CreateMutex(void)
{
SDL_Mutex *mutex;
pthread_mutexattr_t attr;

View File

@@ -29,8 +29,7 @@ struct SDL_RWLock
};
SDL_RWLock *
SDL_CreateRWLock(void)
SDL_RWLock *SDL_CreateRWLock(void)
{
SDL_RWLock *rwlock;

View File

@@ -39,8 +39,7 @@ struct SDL_Semaphore
};
/* Create a semaphore, initialized with value */
SDL_Semaphore *
SDL_CreateSemaphore(Uint32 initial_value)
SDL_Semaphore *SDL_CreateSemaphore(Uint32 initial_value)
{
SDL_Semaphore *sem = (SDL_Semaphore *)SDL_malloc(sizeof(SDL_Semaphore));
if (sem != NULL) {

View File

@@ -168,8 +168,7 @@ void SDL_SYS_SetupThread(const char *name)
#endif
}
SDL_threadID
SDL_ThreadID(void)
SDL_threadID SDL_ThreadID(void)
{
return (SDL_threadID)pthread_self();
}

View File

@@ -29,8 +29,7 @@
static pthread_key_t thread_local_storage = INVALID_PTHREAD_KEY;
static SDL_bool generic_local_storage = SDL_FALSE;
SDL_TLSData *
SDL_SYS_GetTLSData(void)
SDL_TLSData *SDL_SYS_GetTLSData(void)
{
if (thread_local_storage == INVALID_PTHREAD_KEY && !generic_local_storage) {
static SDL_SpinLock lock;