Updated the atomic API for SDL 3.0 naming conventions

Fixes https://github.com/libsdl-org/SDL/issues/7388
This commit is contained in:
Sam Lantinga
2024-01-18 03:39:55 -08:00
parent 4e60fc9b2b
commit a2665f54c8
24 changed files with 156 additions and 112 deletions

View File

@@ -168,9 +168,9 @@ static void SDL_DBus_Init_Spinlocked(void)
void SDL_DBus_Init(void)
{
SDL_AtomicLock(&spinlock_dbus_init); /* make sure two threads can't init at same time, since this can happen before SDL_Init. */
SDL_LockSpinlock(&spinlock_dbus_init); /* make sure two threads can't init at same time, since this can happen before SDL_Init. */
SDL_DBus_Init_Spinlocked();
SDL_AtomicUnlock(&spinlock_dbus_init);
SDL_UnlockSpinlock(&spinlock_dbus_init);
}
void SDL_DBus_Quit(void)

View File

@@ -416,7 +416,7 @@ static void kbd_vt_update(SDL_EVDEV_keyboard_state *state)
}
ioctl(state->console_fd, VT_RELDISP, VT_ACKACQ);
}
SDL_AtomicCAS(&vt_signal_pending, signal_pending, VT_SIGNAL_NONE);
SDL_AtomicCompareAndSwap(&vt_signal_pending, signal_pending, VT_SIGNAL_NONE);
}
}