[pulseaudio-commits] r1458 - /trunk/src/pulsecore/thread-posix.c
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Sun May 27 09:59:35 PDT 2007
Author: lennart
Date: Sun May 27 18:59:34 2007
New Revision: 1458
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=3D1458&root=3Dpulseaudio&vi=
ew=3Drev
Log:
unfortunately we cannot detect if a foreign thread is still running. Thus s=
ucks. But what can we do? U. Drepper thinks our use case is invalid.
Modified:
trunk/src/pulsecore/thread-posix.c
Modified: trunk/src/pulsecore/thread-posix.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/thread-posi=
x.c?rev=3D1458&root=3Dpulseaudio&r1=3D1457&r2=3D1458&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
--- trunk/src/pulsecore/thread-posix.c (original)
+++ trunk/src/pulsecore/thread-posix.c Sun May 27 18:59:34 2007
@@ -111,17 +111,12 @@
=
int pa_thread_is_running(pa_thread *t) {
assert(t);
-
- if (!t->thread_func) {
- /* Mhmm, this is a foreign thread, t->running is not
- * necessarily valid. We misuse pthread_getschedparam() to
- * check if the thread is valid. This might not be portable. */
-
- int policy;
- struct sched_param param;
-
- return pthread_getschedparam(t->id, &policy, ¶m) >=3D 0 || err=
no !=3D ESRCH;
- }
+ =
+ /* Unfortunately there is no way to tell whether a "foreign"
+ * thread is still running. See
+ * http://udrepper.livejournal.com/16844.html for more
+ * information */
+ assert(t->thread_func);
=
return pa_atomic_load(&t->running) > 0;
}
More information about the pulseaudio-commits
mailing list