Updated source to match SDL function prototype style

This commit is contained in:
Sam Lantinga
2023-05-23 10:59:03 -07:00
parent 92f72682e7
commit 3f1fd5abff
243 changed files with 1218 additions and 2364 deletions

View File

@@ -35,8 +35,7 @@ struct SDL_cond
};
/* Create a condition variable */
SDL_cond *
SDL_CreateCond(void)
SDL_cond *SDL_CreateCond(void)
{
SDL_cond *cond;

View File

@@ -39,8 +39,7 @@ struct SDL_mutex
#endif
};
SDL_mutex *
SDL_CreateMutex(void)
SDL_mutex *SDL_CreateMutex(void)
{
SDL_mutex *mutex;
pthread_mutexattr_t attr;

View File

@@ -42,8 +42,7 @@ struct SDL_semaphore
};
/* Create a semaphore, initialized with value */
SDL_sem *
SDL_CreateSemaphore(Uint32 initial_value)
SDL_sem *SDL_CreateSemaphore(Uint32 initial_value)
{
SDL_sem *sem = (SDL_sem *)SDL_malloc(sizeof(SDL_sem));
if (sem != NULL) {
@@ -172,8 +171,7 @@ int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout)
return retval;
}
Uint32
SDL_SemValue(SDL_sem *sem)
Uint32 SDL_SemValue(SDL_sem *sem)
{
int ret = 0;

View File

@@ -181,8 +181,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

@@ -30,8 +30,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;