mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-01 13:21:56 +00:00
Updated source to match SDL function prototype style
This commit is contained in:
@@ -35,8 +35,7 @@ struct SDL_cond
|
||||
};
|
||||
|
||||
/* Create a condition variable */
|
||||
SDL_cond *
|
||||
SDL_CreateCond(void)
|
||||
SDL_cond *SDL_CreateCond(void)
|
||||
{
|
||||
SDL_cond *cond;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user