summaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-02 20:22:32 +0000
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-02 20:22:32 +0000
commit4854adabc83a4e9bc741a5a8700d49e3c44ad9bd (patch)
treead20b1547007e243bfd4112b31a8b839c93d8d75 /libgcc
parentdcd028e121434786998996b4aeb31188b03993a3 (diff)
downloadgcc-4854adabc83a4e9bc741a5a8700d49e3c44ad9bd.tar.gz
libgcc:
PR other/53889 * gthr.h (__gthread_recursive_mutex_destroy): Document new required function. * gthr-posix.h (__gthread_recursive_mutex_destroy): Define. * gthr-single.h (__gthread_recursive_mutex_destroy): Likewise. * config/gthr-rtems.h (__gthread_recursive_mutex_destroy): Likewise. * config/gthr-vxworks.h (__gthread_recursive_mutex_destroy): Likewise. * config/i386/gthr-win32.h (__gthread_recursive_mutex_destroy): Likewise. * config/mips/gthr-mipssde.h (__gthread_recursive_mutex_destroy): Likewise. * config/pa/gthr-dce.h (__gthread_recursive_mutex_destroy): Likewise. * config/s390/gthr-tpf.h (__gthread_recursive_mutex_destroy): Likewise. libstdc++-v3: PR other/53889 * include/std/mutex (__recursive_mutex_base::~__recursive_mutex_base): Use __gthread_recursive_mutex_destroy. (__recursive_mutex_base::_S_destroy): Remove. (__recursive_mutex_base::_S_destroy_win32): Likewise. * include/ext/concurrence.h (__recursive_mutex::~__recursive_mutex): Use __gthread_recursive_mutex_destroy. (__recursive_mutex::_S_destroy): Remove. (__recursive_mutex::_S_destroy_win32): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192002 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog16
-rw-r--r--libgcc/config/gthr-rtems.h11
-rw-r--r--libgcc/config/gthr-vxworks.h9
-rw-r--r--libgcc/config/i386/gthr-win32.c10
-rw-r--r--libgcc/config/i386/gthr-win32.h18
-rw-r--r--libgcc/config/mips/gthr-mipssde.h9
-rw-r--r--libgcc/config/pa/gthr-dce.h9
-rw-r--r--libgcc/config/s390/gthr-tpf.h7
-rw-r--r--libgcc/gthr-posix.h6
-rw-r--r--libgcc/gthr-single.h9
-rw-r--r--libgcc/gthr.h4
11 files changed, 92 insertions, 16 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 42308dba755..9a92f365b00 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,19 @@
+2012-10-02 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ PR other/53889
+ * gthr.h (__gthread_recursive_mutex_destroy): Document new required
+ function.
+ * gthr-posix.h (__gthread_recursive_mutex_destroy): Define.
+ * gthr-single.h (__gthread_recursive_mutex_destroy): Likewise.
+ * config/gthr-rtems.h (__gthread_recursive_mutex_destroy): Likewise.
+ * config/gthr-vxworks.h (__gthread_recursive_mutex_destroy): Likewise.
+ * config/i386/gthr-win32.h (__gthread_recursive_mutex_destroy):
+ Likewise.
+ * config/mips/gthr-mipssde.h (__gthread_recursive_mutex_destroy):
+ Likewise.
+ * config/pa/gthr-dce.h (__gthread_recursive_mutex_destroy): Likewise.
+ * config/s390/gthr-tpf.h (__gthread_recursive_mutex_destroy): Likewise.
+
2012-09-19 Mark Kettenis <kettenis@openbsd.org>
* config.host (hppa-*-openbsd*): New target.
diff --git a/libgcc/config/gthr-rtems.h b/libgcc/config/gthr-rtems.h
index c5bd52292cf..3bfa67bc26c 100644
--- a/libgcc/config/gthr-rtems.h
+++ b/libgcc/config/gthr-rtems.h
@@ -1,8 +1,7 @@
/* RTEMS threads compatibility routines for libgcc2 and libobjc.
by: Rosimildo da Silva( rdasilva@connecttel.com ) */
/* Compile this one with gcc. */
-/* Copyright (C) 1997, 1999, 2000, 2002, 2003, 2005, 2008, 2009
- Free Software Foundation, Inc.
+/* Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of GCC.
@@ -150,6 +149,14 @@ __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
return rtems_gxx_recursive_mutex_unlock( __mutex );
}
+static inline int
+__gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex)
+{
+ /* This requires that recursive and non-recursive mutexes have the same
+ representation. */
+ return rtems_gxx_mutex_destroy (__mutex );
+}
+
#ifdef __cplusplus
}
#endif
diff --git a/libgcc/config/gthr-vxworks.h b/libgcc/config/gthr-vxworks.h
index 63116c460a6..b48c5ac4c2e 100644
--- a/libgcc/config/gthr-vxworks.h
+++ b/libgcc/config/gthr-vxworks.h
@@ -1,7 +1,6 @@
/* Threads compatibility routines for libgcc2 and libobjc for VxWorks. */
/* Compile this one with gcc. */
-/* Copyright (C) 1997, 1999, 2000, 2008, 2009, 2011
- Free Software Foundation, Inc.
+/* Copyright (C) 1997-2012 Free Software Foundation, Inc.
Contributed by Mike Stump <mrs@wrs.com>.
This file is part of GCC.
@@ -111,6 +110,12 @@ __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex)
return __gthread_mutex_unlock (mutex);
}
+static inline int
+__gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_destroy (__mutex);
+}
+
/* pthread_once is complicated enough that it's implemented
out-of-line. See config/vxlib.c. */
diff --git a/libgcc/config/i386/gthr-win32.c b/libgcc/config/i386/gthr-win32.c
index ab1b69fd4cf..fcb15df1dd2 100644
--- a/libgcc/config/i386/gthr-win32.c
+++ b/libgcc/config/i386/gthr-win32.c
@@ -1,8 +1,7 @@
/* Implementation of W32-specific threads compatibility routines for
libgcc2. */
-/* Copyright (C) 1999, 2000, 2002, 2004, 2008, 2009, 2011
- Free Software Foundation, Inc.
+/* Copyright (C) 1999-2012 Free Software Foundation, Inc.
Contributed by Mumit Khan <khan@xraylith.wisc.edu>.
Modified and moved to separate file by Danny Smith
<dannysmith@users.sourceforge.net>.
@@ -259,3 +258,10 @@ __gthr_win32_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex)
return 0;
}
+
+int
+__gthr_win32_recursive_mutex_destroy (__gthread_recursive_mutex_t *mutex)
+{
+ CloseHandle ((HANDLE) mutex->sema);
+ return 0;
+}
diff --git a/libgcc/config/i386/gthr-win32.h b/libgcc/config/i386/gthr-win32.h
index 53f8396cc81..965614841c5 100644
--- a/libgcc/config/i386/gthr-win32.h
+++ b/libgcc/config/i386/gthr-win32.h
@@ -1,8 +1,7 @@
/* Threads compatibility routines for libgcc2 and libobjc. */
/* Compile this one with gcc. */
-/* Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2008, 2009
- Free Software Foundation, Inc.
+/* Copyright (C) 1999-2012 Free Software Foundation, Inc.
Contributed by Mumit Khan <khan@xraylith.wisc.edu>.
This file is part of GCC.
@@ -430,6 +429,8 @@ extern int
__gthr_win32_recursive_mutex_trylock (__gthread_recursive_mutex_t *);
extern int __gthr_win32_recursive_mutex_unlock (__gthread_recursive_mutex_t *);
extern void __gthr_win32_mutex_destroy (__gthread_mutex_t *);
+extern int
+ __gthr_win32_recursive_mutex_destroy (__gthread_recursive_mutex_t *);
static inline int
__gthread_once (__gthread_once_t *__once, void (*__func) (void))
@@ -536,6 +537,12 @@ __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
return 0;
}
+static inline int
+__gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *mutex)
+{
+ return __gthr_win32_recursive_mutex_destroy (__mutex);
+}
+
#else /* ! __GTHREAD_HIDE_WIN32API */
#include <windows.h>
@@ -761,6 +768,13 @@ __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
return 0;
}
+static inline int
+__gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *mutex)
+{
+ CloseHandle ((HANDLE) mutex->sema);
+ return 0;
+}
+
#endif /* __GTHREAD_HIDE_WIN32API */
#ifdef __cplusplus
diff --git a/libgcc/config/mips/gthr-mipssde.h b/libgcc/config/mips/gthr-mipssde.h
index 34f9b6cf54b..2ce22580b90 100644
--- a/libgcc/config/mips/gthr-mipssde.h
+++ b/libgcc/config/mips/gthr-mipssde.h
@@ -1,6 +1,6 @@
/* MIPS SDE threads compatibility routines for libgcc2 and libobjc. */
/* Compile this one with gcc. */
-/* Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2012 Free Software Foundation, Inc.
Contributed by Nigel Stephens <nigel@mips.com>
This file is part of GCC.
@@ -223,6 +223,13 @@ __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
return 0;
}
+static inline int
+__gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t
+ * UNUSED(__mutex))
+{
+ return 0;
+}
+
#ifdef __cplusplus
}
#endif
diff --git a/libgcc/config/pa/gthr-dce.h b/libgcc/config/pa/gthr-dce.h
index d32155a9352..3ba43a187c6 100644
--- a/libgcc/config/pa/gthr-dce.h
+++ b/libgcc/config/pa/gthr-dce.h
@@ -1,7 +1,6 @@
/* Threads compatibility routines for libgcc2 and libobjc. */
/* Compile this one with gcc. */
-/* Copyright (C) 1997, 1999, 2000, 2001, 2004, 2005, 2008, 2009
- Free Software Foundation, Inc.
+/* Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of GCC.
@@ -557,6 +556,12 @@ __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
return __gthread_mutex_unlock (__mutex);
}
+static inline int
+__gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_destroy (__mutex);
+}
+
#endif /* _LIBOBJC */
#endif
diff --git a/libgcc/config/s390/gthr-tpf.h b/libgcc/config/s390/gthr-tpf.h
index fb23e91cfcd..49bce4c2010 100644
--- a/libgcc/config/s390/gthr-tpf.h
+++ b/libgcc/config/s390/gthr-tpf.h
@@ -1,6 +1,6 @@
/* Threads compatibility routines for libgcc2 and libobjc.
Compile this one with gcc.
- Copyright (C) 2004, 2005, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2004-2012 Free Software Foundation, Inc.
This file is part of GCC.
@@ -225,5 +225,10 @@ __gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex)
return 0;
}
+static inline int
+__gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_destroy (__mutex);
+}
#endif /* ! GCC_GTHR_TPF_H */
diff --git a/libgcc/gthr-posix.h b/libgcc/gthr-posix.h
index cc4e518f5b9..1e7ddfeb2f4 100644
--- a/libgcc/gthr-posix.h
+++ b/libgcc/gthr-posix.h
@@ -832,6 +832,12 @@ __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
return __gthread_mutex_unlock (__mutex);
}
+static inline int
+__gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_destroy (__mutex);
+}
+
#ifdef _GTHREAD_USE_COND_INIT_FUNC
static inline void
__gthread_cond_init_function (__gthread_cond_t *__cond)
diff --git a/libgcc/gthr-single.h b/libgcc/gthr-single.h
index 4e396797785..717e6cb37b3 100644
--- a/libgcc/gthr-single.h
+++ b/libgcc/gthr-single.h
@@ -1,7 +1,6 @@
/* Threads compatibility routines for libgcc2 and libobjc. */
/* Compile this one with gcc. */
-/* Copyright (C) 1997, 1999, 2000, 2004, 2008, 2009
- Free Software Foundation, Inc.
+/* Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of GCC.
@@ -286,6 +285,12 @@ __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
return __gthread_mutex_unlock (__mutex);
}
+static inline int
+__gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_destroy (__mutex);
+}
+
#endif /* _LIBOBJC */
#undef UNUSED
diff --git a/libgcc/gthr.h b/libgcc/gthr.h
index 813abe1e57e..9f2b53d2368 100644
--- a/libgcc/gthr.h
+++ b/libgcc/gthr.h
@@ -1,7 +1,6 @@
/* Threads compatibility routines for libgcc2. */
/* Compile this one with gcc. */
-/* Copyright (C) 1997, 1998, 2004, 2008, 2009, 2011
- Free Software Foundation, Inc.
+/* Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of GCC.
@@ -73,6 +72,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
int __gthread_setspecific (__gthread_key_t key, const void *ptr)
int __gthread_mutex_destroy (__gthread_mutex_t *mutex);
+ int __gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *mutex);
int __gthread_mutex_lock (__gthread_mutex_t *mutex);
int __gthread_mutex_trylock (__gthread_mutex_t *mutex);