aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/config/cpu
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-01-08 17:14:49 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2008-01-08 17:14:49 +0100
commit0f3e711eef24f6b00e7dc462288c064d68a9ec43 (patch)
tree8424b6e62d8e9172cc8b7a69773bcbcc62b63024 /libstdc++-v3/config/cpu
parentc90eee444ccd2d39ac22b55e0b6516d842590bfb (diff)
downloadgcc-0f3e711eef24f6b00e7dc462288c064d68a9ec43.zip
gcc-0f3e711eef24f6b00e7dc462288c064d68a9ec43.tar.gz
gcc-0f3e711eef24f6b00e7dc462288c064d68a9ec43.tar.bz2
configure.ac (--enable-linux-futex): Add new configure option.
libstdc++-v3/ * configure.ac (--enable-linux-futex): Add new configure option. (HAVE_LINUX_FUTEX): New AC_DEFINE. * Makefile.in: Rebuilt. * aclocal.m4: Rebuilt. * configure: Rebuilt. * config.h.in: Rebuilt. * config/cpu/generic/cxxabi_tweaks.h (_GLIBCXX_GUARD_BIT, _GLIBCXX_GUARD_PENDING_BIT, _GLIBCXX_GUARD_WAITING_BIT): Define. * config/cpu/arm/cxxabi_tweaks.h (_GLIBCXX_GUARD_BIT, _GLIBCXX_GUARD_PENDING_BIT, _GLIBCXX_GUARD_WAITING_BIT): Define. * libsupc++/guard.cc: Include climits and syscall.h. (_GLIBCXX_USE_FUTEX): Define if futex syscall and atomic builtins are supported. (_GLIBCXX_FUTEX_WAIT, _GLIBCXX_FUTEX_WAKE): Likewise. (__guard_test_bit): New static inline. (__cxa_guard_acquire, __cxa_guard_release, __cxa_guard_abort): Use atomic builtins and futex syscall if _GLIBCXX_USE_FUTEX. config/ * futex.m4: New file. libgomp/ * configure.ac: Move futex checking into ../config/futex.m4. * configure: Rebuilt. * aclocal.m4: Rebuilt. * Makefile.in: Rebuilt. * configure.tgt: Rename have_tls to gcc_cv_have_tls to match 2007-10-15 ../config/tls.m4 change. From-SVN: r131399
Diffstat (limited to 'libstdc++-v3/config/cpu')
-rw-r--r--libstdc++-v3/config/cpu/arm/cxxabi_tweaks.h8
-rw-r--r--libstdc++-v3/config/cpu/generic/cxxabi_tweaks.h5
2 files changed, 11 insertions, 2 deletions
diff --git a/libstdc++-v3/config/cpu/arm/cxxabi_tweaks.h b/libstdc++-v3/config/cpu/arm/cxxabi_tweaks.h
index e56c200..b6b88e4 100644
--- a/libstdc++-v3/config/cpu/arm/cxxabi_tweaks.h
+++ b/libstdc++-v3/config/cpu/arm/cxxabi_tweaks.h
@@ -1,6 +1,6 @@
// Control various target specific ABI tweaks. ARM version.
-// Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2006, 2008 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -46,6 +46,9 @@ namespace __cxxabiv1
// guard variable. */
#define _GLIBCXX_GUARD_TEST(x) ((*(x) & 1) != 0)
#define _GLIBCXX_GUARD_SET(x) *(x) = 1
+#define _GLIBCXX_GUARD_BIT 1
+#define _GLIBCXX_GUARD_PENDING_BIT __guard_test_bit (1, 1)
+#define _GLIBCXX_GUARD_WAITING_BIT __guard_test_bit (2, 1)
typedef int __guard;
// We also want the element size in array cookies.
@@ -62,6 +65,9 @@ namespace __cxxabiv1
// The generic ABI uses the first byte of a 64-bit guard variable.
#define _GLIBCXX_GUARD_TEST(x) (*(char *) (x) != 0)
#define _GLIBCXX_GUARD_SET(x) *(char *) (x) = 1
+#define _GLIBCXX_GUARD_BIT __guard_test_bit (0, 1)
+#define _GLIBCXX_GUARD_PENDING_BIT __guard_test_bit (1, 1)
+#define _GLIBCXX_GUARD_WAITING_BIT __guard_test_bit (2, 1)
__extension__ typedef int __guard __attribute__((mode (__DI__)));
// __cxa_vec_ctor has void return type.
diff --git a/libstdc++-v3/config/cpu/generic/cxxabi_tweaks.h b/libstdc++-v3/config/cpu/generic/cxxabi_tweaks.h
index 95fd306..2859e83 100644
--- a/libstdc++-v3/config/cpu/generic/cxxabi_tweaks.h
+++ b/libstdc++-v3/config/cpu/generic/cxxabi_tweaks.h
@@ -1,6 +1,6 @@
// Control various target specific ABI tweaks. Generic version.
-// Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2006, 2008 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -44,6 +44,9 @@ namespace __cxxabiv1
// The generic ABI uses the first byte of a 64-bit guard variable.
#define _GLIBCXX_GUARD_TEST(x) (*(char *) (x) != 0)
#define _GLIBCXX_GUARD_SET(x) *(char *) (x) = 1
+#define _GLIBCXX_GUARD_BIT __guard_test_bit (0, 1)
+#define _GLIBCXX_GUARD_PENDING_BIT __guard_test_bit (1, 1)
+#define _GLIBCXX_GUARD_WAITING_BIT __guard_test_bit (2, 1)
__extension__ typedef int __guard __attribute__((mode (__DI__)));
// __cxa_vec_ctor has void return type.