add static initializer PA_ATOMIC_INIT()
authorLennart Poettering <lennart@poettering.net>
Sat, 9 Sep 2006 22:54:11 +0000 (22:54 +0000)
committerLennart Poettering <lennart@poettering.net>
Sat, 9 Sep 2006 22:54:11 +0000 (22:54 +0000)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1384 fefdeb5f-60dc-0310-8127-8f9354f1896f

src/pulsecore/atomic.h

index f789142..8d608b5 100644 (file)
@@ -33,6 +33,8 @@ typedef struct pa_atomic_int {
     volatile AO_t value;
 } pa_atomic_int_t;
 
+#define PA_ATOMIC_INIT(v) { .value = (v) }
+
 /* For now we do only full memory barriers. Eventually we might want
  * to support more elaborate memory barriers, in which case we will add
  * suffixes to the function names */