mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-20 14:25:40 +00:00
Use #ifdef/#ifndef instead of #if defined/#if \!defined
This commit is contained in:
committed by
Anonymous Maarten
parent
308bcbbe76
commit
b6ae281e97
@@ -32,7 +32,7 @@
|
||||
* will be chosen at runtime), the function names need to be
|
||||
* suffixed
|
||||
*/
|
||||
#if !defined(SDL_THREAD_GENERIC_COND_SUFFIX)
|
||||
#ifndef SDL_THREAD_GENERIC_COND_SUFFIX
|
||||
#define SDL_CreateCond_generic SDL_CreateCond
|
||||
#define SDL_DestroyCond_generic SDL_DestroyCond
|
||||
#define SDL_CondSignal_generic SDL_CondSignal
|
||||
|
||||
@@ -72,7 +72,7 @@ void SDL_DestroyMutex(SDL_mutex *mutex)
|
||||
/* Lock the mutex */
|
||||
int SDL_LockMutex(SDL_mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */
|
||||
{
|
||||
#if defined(SDL_THREADS_DISABLED)
|
||||
#ifdef SDL_THREADS_DISABLED
|
||||
return 0;
|
||||
#else
|
||||
SDL_threadID this_thread;
|
||||
@@ -101,7 +101,7 @@ int SDL_LockMutex(SDL_mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn
|
||||
/* try Lock the mutex */
|
||||
int SDL_TryLockMutex(SDL_mutex *mutex)
|
||||
{
|
||||
#if defined(SDL_THREADS_DISABLED)
|
||||
#ifdef SDL_THREADS_DISABLED
|
||||
return 0;
|
||||
#else
|
||||
int retval = 0;
|
||||
@@ -133,7 +133,7 @@ int SDL_TryLockMutex(SDL_mutex *mutex)
|
||||
/* Unlock the mutex */
|
||||
int SDL_UnlockMutex(SDL_mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */
|
||||
{
|
||||
#if defined(SDL_THREADS_DISABLED)
|
||||
#ifdef SDL_THREADS_DISABLED
|
||||
return 0;
|
||||
#else
|
||||
if (mutex == NULL) {
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "SDL_systhread_c.h"
|
||||
|
||||
#if defined(SDL_THREADS_DISABLED)
|
||||
#ifdef SDL_THREADS_DISABLED
|
||||
|
||||
SDL_sem *
|
||||
SDL_CreateSemaphore(Uint32 initial_value)
|
||||
|
||||
Reference in New Issue
Block a user