[pulseaudio-commits] r1729 - in /branches/lennart/src/pulsecore: memblock.c memblock.h
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Thu Aug 30 15:42:03 PDT 2007
Author: lennart
Date: Fri Aug 31 00:42:02 2007
New Revision: 1729
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=3D1729&root=3Dpulseaudio&vi=
ew=3Drev
Log:
add new function pa_memblock_ref_is_one()
Modified:
branches/lennart/src/pulsecore/memblock.c
branches/lennart/src/pulsecore/memblock.h
Modified: branches/lennart/src/pulsecore/memblock.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/=
memblock.c?rev=3D1729&root=3Dpulseaudio&r1=3D1728&r2=3D1729&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/lennart/src/pulsecore/memblock.c (original)
+++ branches/lennart/src/pulsecore/memblock.c Fri Aug 31 00:42:02 2007
@@ -382,6 +382,18 @@
pa_assert(PA_REFCNT_VALUE(b) > 0);
=
return b->read_only && PA_REFCNT_VALUE(b) =3D=3D 1;
+}
+
+/* No lock necessary */
+int pa_memblock_ref_is_one(pa_memblock *b) {
+ int r;
+ =
+ pa_assert(b);
+
+ r =3D PA_REFCNT_VALUE(b);
+ pa_assert(r > 0);
+
+ return r =3D=3D 1;
}
=
/* No lock necessary */
Modified: branches/lennart/src/pulsecore/memblock.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/=
memblock.h?rev=3D1729&root=3Dpulseaudio&r1=3D1728&r2=3D1729&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/lennart/src/pulsecore/memblock.h (original)
+++ branches/lennart/src/pulsecore/memblock.h Fri Aug 31 00:42:02 2007
@@ -107,6 +107,7 @@
void pa_memblock_unref_fixed(pa_memblock*b);
=
int pa_memblock_is_read_only(pa_memblock *b);
+int pa_memblock_ref_is_one(pa_memblock *b);
void* pa_memblock_acquire(pa_memblock *b);
void pa_memblock_release(pa_memblock *b);
size_t pa_memblock_get_length(pa_memblock *b);
More information about the pulseaudio-commits
mailing list