[vlc-commits] Add VLC_ATOMIC_INIT, static initializer for vlc_atomic_t

Rémi Denis-Courmont git at videolan.org
Sun Jul 10 17:53:29 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jul 10 17:39:45 2011 +0300| [da9ea07cf78056b6362a2afc0ab5b820712de93a] | committer: Rémi Denis-Courmont

Add VLC_ATOMIC_INIT, static initializer for vlc_atomic_t

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=da9ea07cf78056b6362a2afc0ab5b820712de93a
---

 include/vlc_atomic.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/include/vlc_atomic.h b/include/vlc_atomic.h
index 48c2cbb..39d02b4 100644
--- a/include/vlc_atomic.h
+++ b/include/vlc_atomic.h
@@ -26,6 +26,9 @@
  * Atomic operations do not require locking, but they are not very powerful.
  */
 
+/** Static initializer for \ref vlc_atomic_t */
+# define VLC_ATOMIC_INIT(val) { (val) }
+
 /* All functions return the atom value _after_ the operation. */
 
 VLC_API uintptr_t vlc_atomic_get(const vlc_atomic_t *);



More information about the vlc-commits mailing list