pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/multimedia/gxine Replace while (pthread_mutex_trylock)...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/90fc2beae1db
branches:  trunk
changeset: 516943:90fc2beae1db
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Tue Aug 01 14:56:06 2006 +0000

description:
Replace while (pthread_mutex_trylock) sched_yield() with a simple
pthread_mutex_lock. This avoids xine taking 100% CPU load on DragonFly.
Issue reported on DragoFly mailing list and pointed out by
YONETANI Tomokazu. Bump revision.

diffstat:

 multimedia/gxine/Makefile         |   3 ++-
 multimedia/gxine/distinfo         |   4 ++--
 multimedia/gxine/patches/patch-al |  16 +++++++++++++---
 3 files changed, 17 insertions(+), 6 deletions(-)

diffs (61 lines):

diff -r c380f8680a55 -r 90fc2beae1db multimedia/gxine/Makefile
--- a/multimedia/gxine/Makefile Tue Aug 01 14:34:35 2006 +0000
+++ b/multimedia/gxine/Makefile Tue Aug 01 14:56:06 2006 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.25 2006/07/07 18:28:48 drochner Exp $
+# $NetBSD: Makefile,v 1.26 2006/08/01 14:56:06 joerg Exp $
 
 DISTNAME=      gxine-0.5.7
+PKGREVISION=   1
 CATEGORIES=    multimedia
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=xine/}
 EXTRACT_SUFX=  .tar.bz2
diff -r c380f8680a55 -r 90fc2beae1db multimedia/gxine/distinfo
--- a/multimedia/gxine/distinfo Tue Aug 01 14:34:35 2006 +0000
+++ b/multimedia/gxine/distinfo Tue Aug 01 14:56:06 2006 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.15 2006/07/07 18:28:48 drochner Exp $
+$NetBSD: distinfo,v 1.16 2006/08/01 14:56:06 joerg Exp $
 
 SHA1 (gxine-0.5.7.tar.bz2) = 806732097cffcfe23d24be0a1abc1640767e9b13
 RMD160 (gxine-0.5.7.tar.bz2) = 063212e277426274169384dd3e104eed127bf914
@@ -13,7 +13,7 @@
 SHA1 (patch-ai) = 46a40d08b77e10a3d96bdf61ac31e1f02eba65e8
 SHA1 (patch-aj) = 0a9efacd2aa90855bf990944c058028af367c24d
 SHA1 (patch-ak) = f13bc48f7c836405a0587e378cc7ec0de5a4710e
-SHA1 (patch-al) = f1b96dacdb11ea18d714162a1bd5e957aa74dfbb
+SHA1 (patch-al) = 56711d0d42cb6b6e42b8c9c11d2869bfd5ccbf62
 SHA1 (patch-am) = 25e7e53bd56cd30cf06dd010f78ed0715767421a
 SHA1 (patch-an) = e8fd4c81fad14e907aad2bffc3962c39322ac0e5
 SHA1 (patch-ao) = 97e176786b0e910913ecea018b5948401f69c379
diff -r c380f8680a55 -r 90fc2beae1db multimedia/gxine/patches/patch-al
--- a/multimedia/gxine/patches/patch-al Tue Aug 01 14:34:35 2006 +0000
+++ b/multimedia/gxine/patches/patch-al Tue Aug 01 14:56:06 2006 +0000
@@ -1,6 +1,6 @@
-$NetBSD: patch-al,v 1.1 2006/05/03 12:47:47 drochner Exp $
+$NetBSD: patch-al,v 1.2 2006/08/01 14:56:06 joerg Exp $
 
---- src/engine.c.orig  2006-03-16 18:16:18.000000000 +0100
+--- src/engine.c.orig  2006-06-30 14:56:00.000000000 +0000
 +++ src/engine.c
 @@ -36,7 +36,7 @@
  
@@ -11,7 +11,17 @@
  
  gboolean initialised = FALSE;
  
-@@ -277,7 +277,12 @@ void engine_init (void)
+@@ -299,8 +299,7 @@ static gboolean js_queue_cb (GtkWidget *
+   while ((js = g_async_queue_try_pop (js_queue)))
+   {
+     /* spin; play_exec gets this & the GDK lock in reverse order */ 
+-    while (pthread_mutex_trylock (&widgets_update_lock))
+-      sched_yield ();
++    pthread_mutex_lock (&widgets_update_lock);
+     pthread_mutex_unlock (&widgets_update_lock); /* JS 'play()' needs it */
+     engine_exec_obj (js->cmd, js->obj, js->cb, js->cb_data, js->ecb, js->src);
+     free (js->cmd);
+@@ -412,7 +411,12 @@ void engine_init (void)
  {
    char *cfgfilename;
    GtkWidget *w;



Home | Main Index | Thread Index | Old Index