uintptr_t vlc_atomic_swap (vlc_atomic_t *atom, uintptr_t v) { /* grmbl, gcc does not provide an intrinsic for this! */ uintptr_t u; do u = vlc_atomic_get (atom); while (vlc_atomic_compare_swap (atom, u, v) != u); return u; }
/** * This function will safely mark aout input to be restarted as soon as * possible to take configuration changes into account */ void aout_InputRequestRestart (audio_output_t *aout) { aout_owner_t *owner = aout_owner (aout); vlc_atomic_compare_swap (&owner->restart, 0, AOUT_RESTART_INPUT); }