[Pkg-voip-commits] [portaudio19] 07/09: Drop pa_linux_alsa-fix-hang-in-callback-caused-by-abort.patch
Benjamin Drung
bdrung at moszumanska.debian.org
Sun Dec 25 20:36:05 UTC 2016
This is an automated email from the git hooks/post-receive script.
bdrung pushed a commit to branch master
in repository portaudio19.
commit 97e86894d69de548da452b23b6ce15729768fa08
Author: Benjamin Drung <bdrung at debian.org>
Date: Sun Dec 25 21:33:32 2016 +0100
Drop pa_linux_alsa-fix-hang-in-callback-caused-by-abort.patch
This patch is included in the upstream release.
---
...alsa-fix-hang-in-callback-caused-by-abort.patch | 93 ----------------------
debian/patches/series | 1 -
2 files changed, 94 deletions(-)
diff --git a/debian/patches/0001-pa_linux_alsa-fix-hang-in-callback-caused-by-abort.patch b/debian/patches/0001-pa_linux_alsa-fix-hang-in-callback-caused-by-abort.patch
deleted file mode 100644
index a21d726..0000000
--- a/debian/patches/0001-pa_linux_alsa-fix-hang-in-callback-caused-by-abort.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From f17d549093a9653285f81ff5a14f4a41d395fbce Mon Sep 17 00:00:00 2001
-From: Phil Burk <philburk at mobileer.com>
-Date: Wed, 14 Sep 2016 08:50:33 -0700
-Subject: [PATCH] pa_linux_alsa: fix hang in callback caused by abort
-
-The author of this patch is Alan Horstmann.
-
-Fixes ticket #251
----
- src/hostapi/alsa/pa_linux_alsa.c | 35 ++++++++++++++++++++++++++---------
- 1 file changed, 26 insertions(+), 9 deletions(-)
-
---- a/src/hostapi/alsa/pa_linux_alsa.c
-+++ b/src/hostapi/alsa/pa_linux_alsa.c
-@@ -3810,8 +3810,23 @@
- totalFds += self->playback.nfds;
- }
-
-+#ifdef PTHREAD_CANCELED
-+ if( self->callbackMode )
-+ {
-+ /* To allow 'Abort' to terminate the callback thread, enable cancelability just for poll() (& disable after) */
-+ pthread_setcancelstate( PTHREAD_CANCEL_ENABLE, NULL );
-+ }
-+#endif
-+
- pollResults = poll( self->pfds, totalFds, pollTimeout );
-
-+#ifdef PTHREAD_CANCELED
-+ if( self->callbackMode )
-+ {
-+ pthread_setcancelstate( PTHREAD_CANCEL_DISABLE, NULL );
-+ }
-+#endif
-+
- if( pollResults < 0 )
- {
- /* XXX: Depend on preprocessor condition? */
-@@ -4180,12 +4195,18 @@
- int streamStarted = 0;
-
- assert( stream );
-+ /* Not implemented */
-+ assert( !stream->primeBuffers );
-
- /* Execute OnExit when exiting */
- pthread_cleanup_push( &OnExit, stream );
--
-- /* Not implemented */
-- assert( !stream->primeBuffers );
-+#ifdef PTHREAD_CANCELED
-+ /* 'Abort' will use thread cancellation to terminate the callback thread, but the Alsa-lib functions
-+ * are NOT cancel-safe, (and can end up in an inconsistent state). So, disable cancelability for
-+ * the thread here, and just re-enable it for the poll() in PaAlsaStream_WaitForFrames(). */
-+ pthread_testcancel();
-+ pthread_setcancelstate( PTHREAD_CANCEL_DISABLE, NULL );
-+#endif
-
- /* @concern StreamStart If the output is being primed the output pcm needs to be prepared, otherwise the
- * stream is started immediately. The latter involves signaling the waiting main thread.
-@@ -4270,10 +4291,6 @@
- {
- xrun = 0;
-
--#ifdef PTHREAD_CANCELED
-- pthread_testcancel();
--#endif
--
- /** @concern Xruns Under/overflows are to be reported to the callback */
- if( stream->underrun > 0.0 )
- {
-@@ -4304,11 +4321,12 @@
- #if 0
- CallbackUpdate( &stream->threading );
- #endif
-+
- CalculateTimeInfo( stream, &timeInfo );
- PaUtil_BeginBufferProcessing( &stream->bufferProcessor, &timeInfo, cbFlags );
- cbFlags = 0;
-
-- /* CPU load measurement should include processing activivity external to the stream callback */
-+ /* CPU load measurement should include processing activity external to the stream callback */
- PaUtil_BeginCpuLoadMeasurement( &stream->cpuLoadMeasurer );
-
- framesGot = framesAvail;
-@@ -4339,7 +4357,6 @@
- {
- /* Go back to polling for more frames */
- break;
--
- }
-
- if( paContinue != callbackResult )
diff --git a/debian/patches/series b/debian/patches/series
index 0d13b3c..ebc90e2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1 @@
audacity-portmixer.patch
-0001-pa_linux_alsa-fix-hang-in-callback-caused-by-abort.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/portaudio19.git
More information about the Pkg-voip-commits
mailing list