pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/cad/electric Hack around silly behavior that unlocks e...
details: https://anonhg.NetBSD.org/pkgsrc/rev/6f6dddb45669
branches: trunk
changeset: 396715:6f6dddb45669
user: dholland <dholland%pkgsrc.org@localhost>
date: Sat Aug 01 16:22:25 2009 +0000
description:
Hack around silly behavior that unlocks every freshly created pthread
mutex. Fixes PR 35261.
diffstat:
cad/electric/Makefile | 4 ++--
cad/electric/distinfo | 6 ++++--
cad/electric/patches/patch-ac | 38 +++++++++++++++++++++++++++++++++++---
cad/electric/patches/patch-ad | 14 ++++++++++++++
cad/electric/patches/patch-ae | 14 ++++++++++++++
5 files changed, 69 insertions(+), 7 deletions(-)
diffs (116 lines):
diff -r 1a4a056bd74e -r 6f6dddb45669 cad/electric/Makefile
--- a/cad/electric/Makefile Sat Aug 01 15:33:46 2009 +0000
+++ b/cad/electric/Makefile Sat Aug 01 16:22:25 2009 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.17 2009/07/08 15:35:48 joerg Exp $
+# $NetBSD: Makefile,v 1.18 2009/08/01 16:22:25 dholland Exp $
#
DISTNAME= electric-7.00
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= cad
MASTER_SITES= ${MASTER_SITE_GNU:=electric/}
diff -r 1a4a056bd74e -r 6f6dddb45669 cad/electric/distinfo
--- a/cad/electric/distinfo Sat Aug 01 15:33:46 2009 +0000
+++ b/cad/electric/distinfo Sat Aug 01 16:22:25 2009 +0000
@@ -1,8 +1,10 @@
-$NetBSD: distinfo,v 1.4 2005/12/28 14:17:57 joerg Exp $
+$NetBSD: distinfo,v 1.5 2009/08/01 16:22:25 dholland Exp $
SHA1 (electric-7.00.tar.gz) = 782652b078e81060928eadfae364cd74da07788e
RMD160 (electric-7.00.tar.gz) = c57a2e0a32e40d435e125cad6dfc5c1b98e9067b
Size (electric-7.00.tar.gz) = 4474722 bytes
SHA1 (patch-aa) = ca3aa5c28eef818dce61055daeedc1b7d2e9a8a7
SHA1 (patch-ab) = f9c648dda476f1e7cd3c3e875236b76198fa317b
-SHA1 (patch-ac) = f599a3440bb1a6402280fe4129361c13cabd38f8
+SHA1 (patch-ac) = fac49d88feab792ff665686e9e4fc8a29caab471
+SHA1 (patch-ad) = 6be5c47ead4bf023ef6215d7bce496a2f7abb5b0
+SHA1 (patch-ae) = 095e56c085ae77d0615134b070082f6599a95280
diff -r 1a4a056bd74e -r 6f6dddb45669 cad/electric/patches/patch-ac
--- a/cad/electric/patches/patch-ac Sat Aug 01 15:33:46 2009 +0000
+++ b/cad/electric/patches/patch-ac Sat Aug 01 16:22:25 2009 +0000
@@ -1,7 +1,11 @@
-$NetBSD: patch-ac,v 1.2 2005/12/28 14:17:57 joerg Exp $
+$NetBSD: patch-ac,v 1.3 2009/08/01 16:22:26 dholland Exp $
+
+Get number of processors for NetBSD/Dragonfly.
---- src/graph/graphunixx11.c.orig 2004-07-16 01:59:53.000000000 +0000
-+++ src/graph/graphunixx11.c
+Hack around silly behavior that unlocks every newly created pthread mutex.
+
+--- src/graph/graphunixx11.c.orig 2004-07-15 21:59:53.000000000 -0400
++++ src/graph/graphunixx11.c 2009-08-01 12:17:39.000000000 -0400
@@ -3085,11 +3085,30 @@ void ewait(INTBIG process)
/*
* Routine to return the number of processors on this machine.
@@ -33,3 +37,31 @@
return(numproc);
}
+@@ -3168,6 +3187,27 @@ void emutexunlock(void *vmutex)
+ }
+
+ /*
++ * Routine that ensures mutual-exclusion object "vmutex" is unlocked.
++ */
++void emutexensureunlocked(void *vmutex)
++{
++#ifdef HAVE_PTHREAD
++ pthread_mutex_t *mutex;
++
++ mutex = (pthread_mutex_t *)vmutex;
++ if (pthread_mutex_trylock(mutex) == 0)
++ {
++ pthread_mutex_unlock(mutex);
++ }
++#else
++ mutex_t *mutexid;
++
++ mutexid = (mutex_t *)vmutex;
++ mutex_unlock(mutexid);
++#endif
++}
++
++/*
+ * Routine to determine the list of printers and return it.
+ * The list terminates with a zero.
+ */
diff -r 1a4a056bd74e -r 6f6dddb45669 cad/electric/patches/patch-ad
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cad/electric/patches/patch-ad Sat Aug 01 16:22:25 2009 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-ad,v 1.1 2009/08/01 16:22:26 dholland Exp $
+
+Hack around silly behavior that unlocks every newly created pthread mutex.
+
+--- src/include/global.h.orig 2009-08-01 12:18:08.000000000 -0400
++++ src/include/global.h 2009-08-01 12:18:21.000000000 -0400
+@@ -2404,6 +2404,7 @@ void enewthread(void* (*function
+ void *emakemutex(void);
+ void emutexlock(void *vmutex);
+ void emutexunlock(void *vmutex);
++void emutexensureunlocked(void *vmutex);
+ CHAR **eprinterlist(void);
+ void flushscreen(void);
+ void exitprogram(void);
diff -r 1a4a056bd74e -r 6f6dddb45669 cad/electric/patches/patch-ae
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cad/electric/patches/patch-ae Sat Aug 01 16:22:25 2009 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-ae,v 1.1 2009/08/01 16:22:26 dholland Exp $
+
+Hack around silly behavior that unlocks every newly created pthread mutex.
+
+--- src/db/dbcontrol.c.orig 2009-08-01 12:21:37.000000000 -0400
++++ src/db/dbcontrol.c 2009-08-01 12:22:18.000000000 -0400
+@@ -499,6 +499,6 @@ BOOLEAN ensurevalidmutex(void **mutex, B
+ return(TRUE);
+ }
+ }
+- emutexunlock(*mutex);
++ emutexensureunlocked(*mutex);
+ return(FALSE);
+ }
Home |
Main Index |
Thread Index |
Old Index