]> git.sesse.net Git - vlc/blobdiff - include/vlc_atomic.h
Add FOURCC's for DAT12 and L24 (IETF RFC3190)
[vlc] / include / vlc_atomic.h
index 2b0ff88e6783dc21bfff7597846a982251ae9658..770e47aae6ba373f59e3bc68450c61b0edf958e6 100644 (file)
  * Atomic operations do not require locking, but they are not very powerful.
  */
 
-/**
- * Memory storage space for an atom. Never access it directly.
- */
-typedef union
-{
-    uintptr_t u;
-    intptr_t  s;
-} vlc_atomic_t;
-
 /* All functions return the atom value _after_ the operation. */
 
 VLC_EXPORT(uintptr_t, vlc_atomic_get, (const vlc_atomic_t *));
@@ -56,4 +47,7 @@ static inline uintptr_t vlc_atomic_dec (vlc_atomic_t *atom)
     return vlc_atomic_sub (atom, 1);
 }
 
+VLC_EXPORT(uintptr_t, vlc_atomic_swap, (vlc_atomic_t *, uintptr_t));
+VLC_EXPORT(uintptr_t, vlc_atomic_compare_swap, (vlc_atomic_t *, uintptr_t, uintptr_t));
+
 #endif