summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorjmcneill <jmcneill>2008-12-20 17:53:51 +0000
committerjmcneill <jmcneill>2008-12-20 17:53:51 +0000
commit7d102422ee97e3082c75796da32154ca7c60d311 (patch)
treeb28f75e9ae2991366ee3260a74e8478b034ddd6f /audio
parenta052671259c4d4f7027353910e2e62bde59f0361 (diff)
downloadpkgsrc-7d102422ee97e3082c75796da32154ca7c60d311.tar.gz
Make NetBSD native atomic ops support work.
Diffstat (limited to 'audio')
-rw-r--r--audio/pulseaudio/distinfo4
-rw-r--r--audio/pulseaudio/patches/patch-bb20
2 files changed, 14 insertions, 10 deletions
diff --git a/audio/pulseaudio/distinfo b/audio/pulseaudio/distinfo
index 8b19e2377fa..d0d404ddd51 100644
--- a/audio/pulseaudio/distinfo
+++ b/audio/pulseaudio/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.4 2008/12/20 16:50:50 jmcneill Exp $
+$NetBSD: distinfo,v 1.5 2008/12/20 17:53:51 jmcneill Exp $
SHA1 (pulseaudio-0.9.13.tar.gz) = c8482f1bb42d5213bfdbe2154e1a55b7bc04c915
RMD160 (pulseaudio-0.9.13.tar.gz) = 07cea9939dfb4fc76f13bf01dfe22ab6d0fd8459
@@ -10,4 +10,4 @@ SHA1 (patch-ad) = 40474c4e04dffe836c41ff348d959c821da527fd
SHA1 (patch-ae) = 1cd31d18c133fdd5e8db59be319ba5b7a45fe0fe
SHA1 (patch-af) = 31b8564cb91aabb5de5490659e77de984fd1920b
SHA1 (patch-ba) = 518d23027fc9467a8bae2385233c2991136ee905
-SHA1 (patch-bb) = 1a9f436c0809af35b4846d09be5ffdc25fa7daeb
+SHA1 (patch-bb) = ded51f4642163dd5f78bb51522df64cb6ef8b985
diff --git a/audio/pulseaudio/patches/patch-bb b/audio/pulseaudio/patches/patch-bb
index 653d7bcaca3..b77467f0300 100644
--- a/audio/pulseaudio/patches/patch-bb
+++ b/audio/pulseaudio/patches/patch-bb
@@ -1,8 +1,8 @@
-$NetBSD: patch-bb,v 1.1 2008/12/20 16:10:25 ahoka Exp $
+$NetBSD: patch-bb,v 1.2 2008/12/20 17:53:51 jmcneill Exp $
---- src/pulsecore/atomic.h.orig 2008-09-03 23:13:44.000000000 +0200
-+++ src/pulsecore/atomic.h
-@@ -107,6 +107,81 @@ static inline pa_bool_t pa_atomic_ptr_cm
+--- src/pulsecore/atomic.h.orig 2008-09-03 17:13:44.000000000 -0400
++++ src/pulsecore/atomic.h 2008-12-20 12:35:13.000000000 -0500
+@@ -107,6 +107,85 @@ static inline pa_bool_t pa_atomic_ptr_cm
return __sync_bool_compare_and_swap(&a->value, (long) old_p, (long) new_p);
}
@@ -30,22 +30,26 @@ $NetBSD: patch-bb,v 1.1 2008/12/20 16:10:25 ahoka Exp $
+
+/* Returns the previously set value */
+static inline int pa_atomic_add(pa_atomic_t *a, int i) {
-+ return (int) atomic_add_int_nv(&a->value, i);
++ int nv = (int)atomic_add_int_nv(&a->value, i);
++ return nv - i;
+}
+
+/* Returns the previously set value */
+static inline int pa_atomic_sub(pa_atomic_t *a, int i) {
-+ return (int) atomic_add_int_nv(&a->value, -i);
++ int nv = (int)atomic_add_int_nv(&a->value, -i);
++ return nv + i;
+}
+
+/* Returns the previously set value */
+static inline int pa_atomic_inc(pa_atomic_t *a) {
-+ return (int) atomic_inc_uint_nv(&a->value);
++ int nv = (int)atomic_inc_uint_nv(&a->value);
++ return nv - 1;
+}
+
+/* Returns the previously set value */
+static inline int pa_atomic_dec(pa_atomic_t *a) {
-+ return (int) atomic_dec_uint_nv(&a->value);
++ int nv = (int)atomic_dec_uint_nv(&a->value);
++ return nv + 1;
+}
+
+/* Returns TRUE when the operation was successful. */