tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Does "options P1003_1B_SEMAPHORE" still exist?
On Tue, 6 May 2014 21:05:00 +0200
Thomas Klausner <tk%giga.or.at@localhost> wrote:
> I didn't know about this. Does this look similar to
>
> http://www.imagemagick.org/discourse-server/viewtopic.php?f=2&t=25475
>
> ?
Hmm - this is NetBSD-6, but the stacktrace shows that the crash happens
in the ksem code path which is used for named/shared semaphores only.
So it seems that gomp is using these... it might be worth a try to
make libgomp use its own implementation.
The appended patch is for -current of about 3 months ago, with
gcc-4.5.4. The only change to original code is that to
libgomp/configure, the rest is generated, but the generation process
is somewhat complex (using the "mknative script"). And I've generated
it only for i386 -- for a quick try it should work to apply the
"config.h" change manually.
best regards
Matthias
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
# HG changeset patch
# Parent 70685c5d8471ebf56889df2fd7153f4ce133f522
diff -r 70685c5d8471 external/gpl3/gcc/dist/libgomp/configure
--- a/external/gpl3/gcc/dist/libgomp/configure Fri Dec 07 19:38:42 2012 +0100
+++ b/external/gpl3/gcc/dist/libgomp/configure Sat Dec 08 15:47:57 2012 +0100
@@ -15043,7 +15043,7 @@
# Check for broken semaphore implementation on darwin.
# sem_init returns: sem_init error: Function not implemented.
case "$host" in
- *-darwin*)
+ *-darwin* | *-netbsd*)
$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
diff -r 70685c5d8471 external/gpl3/gcc/lib/libgomp/arch/i386/config.h
--- a/external/gpl3/gcc/lib/libgomp/arch/i386/config.h Fri Dec 07 19:38:42
2012 +0100
+++ b/external/gpl3/gcc/lib/libgomp/arch/i386/config.h Sat Dec 08 15:47:57
2012 +0100
@@ -18,7 +18,7 @@
#define HAVE_ATTRIBUTE_VISIBILITY 1
/* Define if the POSIX Semaphores do not work on your system. */
-/* #undef HAVE_BROKEN_POSIX_SEMAPHORES */
+#define HAVE_BROKEN_POSIX_SEMAPHORES 1
/* Define to 1 if the target assembler supports thread-local storage. */
/* #undef HAVE_CC_TLS */
diff -r 70685c5d8471 external/gpl3/gcc/lib/libgomp/arch/i386/libgomp_f.h
--- a/external/gpl3/gcc/lib/libgomp/arch/i386/libgomp_f.h Fri Dec 07
19:38:42 2012 +0100
+++ b/external/gpl3/gcc/lib/libgomp/arch/i386/libgomp_f.h Sat Dec 08
15:47:57 2012 +0100
@@ -1,7 +1,3 @@
-/* This file is automatically generated. DO NOT EDIT! */
-/* Generated from: NetBSD: mknative-gcc,v 1.62 2011/08/17 18:34:13 matt
Exp */
-/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp
*/
-
/* Copyright (C) 2005, 2008, 2009 Free Software Foundation, Inc.
Contributed by Jakub Jelinek <jakub%redhat.com@localhost>.
@@ -34,8 +30,8 @@
#include "libgomp.h"
-#if (4 == 4) \
- && (4 <= 4)
+#if (28 == 8) \
+ && (4 <= 28)
# define OMP_LOCK_DIRECT
typedef omp_lock_t *omp_lock_arg_t;
# define omp_lock_arg(arg) (arg)
@@ -44,8 +40,8 @@
# define omp_lock_arg(arg) ((arg)->lock)
# endif
-#if (12 == 8) \
- && (4 <= 12)
+#if (36 == 8) \
+ && (4 <= 36)
# define OMP_NEST_LOCK_DIRECT
typedef omp_nest_lock_t *omp_nest_lock_arg_t;
# define omp_nest_lock_arg(arg) (arg)
@@ -77,11 +73,11 @@
static inline void
omp_check_defines (void)
{
- char test[(4 != sizeof (omp_lock_t)
+ char test[(28 != sizeof (omp_lock_t)
|| 4 != __alignof (omp_lock_t)
- || 12 != sizeof (omp_nest_lock_t)
+ || 36 != sizeof (omp_nest_lock_t)
|| 4 != __alignof (omp_nest_lock_t)
- || 4 != sizeof (*(omp_lock_arg_t) 0)
+ || 8 != sizeof (*(omp_lock_arg_t) 0)
|| 8 != sizeof (*(omp_nest_lock_arg_t) 0))
? -1 : 1] __attribute__ ((__unused__));
char test2[(28 != sizeof (omp_lock_25_t)
Home |
Main Index |
Thread Index |
Old Index