Rename SDL_atomic_t to SDL_AtomicInt

This commit is contained in:
David Demelier authored and Sam Lantinga committed 2023-03-09 09:00:09 -08:00
1 parent 8994878767
commit d0c4849d0b
33 files changed
+81 -70

No files matched your search

+4 -4
View File
@@ -123,7 +123,7 @@ static SDL_INLINE void leaveLock(void *a)
#endif
SDL_bool
SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval)
SDL_AtomicCAS(SDL_AtomicInt *a, int oldval, int newval)
{
#ifdef HAVE_MSC_ATOMICS
SDL_COMPILE_TIME_ASSERT(atomic_cas, sizeof(long) == sizeof(a->value));
@@ -183,7 +183,7 @@ SDL_AtomicCASPtr(void **a, void *oldval, void *newval)
#endif
}
int SDL_AtomicSet(SDL_atomic_t *a, int v)
int SDL_AtomicSet(SDL_AtomicInt *a, int v)
{
#ifdef HAVE_MSC_ATOMICS
SDL_COMPILE_TIME_ASSERT(atomic_set, sizeof(long) == sizeof(a->value));
@@ -223,7 +223,7 @@ SDL_AtomicSetPtr(void **a, void *v)
#endif
}
int SDL_AtomicAdd(SDL_atomic_t *a, int v)
int SDL_AtomicAdd(SDL_AtomicInt *a, int v)
{
#ifdef HAVE_MSC_ATOMICS
SDL_COMPILE_TIME_ASSERT(atomic_add, sizeof(long) == sizeof(a->value));
@@ -246,7 +246,7 @@ int SDL_AtomicAdd(SDL_atomic_t *a, int v)
#endif
}
int SDL_AtomicGet(SDL_atomic_t *a)
int SDL_AtomicGet(SDL_AtomicInt *a)
{
#ifdef HAVE_ATOMIC_LOAD_N
return __atomic_load_n(&a->value, __ATOMIC_SEQ_CST);