Commit 036e0d4f by Benjamin Kosnik

atomic: Remove atomic_address, uplift to N3225.

2011-02-16  Benjamin Kosnik  <bkoz@redhat.com>

	* include/std/atomic: Remove atomic_address, uplift to N3225.
	* include/bits/atomic_0.h: Same.
	* include/bits/atomic_2.h: Same.
	* include/bits/atomic_base.h: Same.
	* testsuite/29_atomics/atomic_address/*: Delete.

From-SVN: r170217
parent 3808007c
2011-02-16 Benjamin Kosnik <bkoz@redhat.com>
* include/std/atomic: Remove atomic_address, uplift to N3225.
* include/bits/atomic_0.h: Same.
* include/bits/atomic_2.h: Same.
* include/bits/atomic_base.h: Same.
* testsuite/29_atomics/atomic_address/*: Delete.
2011-02-14 Jonathan Wakely <jwakely.gcc@gmail.com>
* include/bits/regex.h (sub_match::sub_match): Add.
......@@ -36,7 +44,7 @@
* testsuite/ext/is_heap/47709.cc: New.
2011-02-12 Jakub Jelinek <jakub@redhat.com>
Jonathan Wakely <jwakely.gcc@gmail.com>
Jonathan Wakely <jwakely.gcc@gmail.com>
PR libstdc++/47662
* testsuite/17_intro/headers/c++200x/operator_names.cc: New.
......@@ -259,10 +267,10 @@
2011-01-31 Paolo Carlini <paolo.carlini@oracle.com>
* doc/html/ext/lwg-active.html: Update to Revision D73.
* doc/html/ext/lwg-closed.html: Likewise.
* doc/html/ext/lwg-defects.html: Likewise.
* doc/xml/manual/intro.xml: Update status of issues 408, 539, 865.
* doc/html/ext/lwg-active.html: Update to Revision D73.
* doc/html/ext/lwg-closed.html: Likewise.
* doc/html/ext/lwg-defects.html: Likewise.
* doc/xml/manual/intro.xml: Update status of issues 408, 539, 865.
2011-01-30 Benjamin Kosnik <bkoz@redhat.com>
......
......@@ -22,7 +22,7 @@
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file bits/atomic_base.h
/** @file bits/atomic_base.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{atomic}
*/
......@@ -68,6 +68,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return __mo2;
}
void
atomic_thread_fence(memory_order);
void
atomic_signal_fence(memory_order);
/// kill_dependency
template<typename _Tp>
inline _Tp
......@@ -78,7 +84,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
/**
* @brief Base type for atomic_flag.
* @brief Base type for atomic_flag.
*
* Base type is POD with data, allowing atomic_flag to derive from
* it and meet the standard layout type requirement. In addition to
......@@ -114,27 +120,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
namespace __atomic0
{
struct atomic_flag;
struct atomic_address;
template<typename _IntTp>
struct __atomic_base;
}
}
namespace __atomic2
{
struct atomic_flag;
struct atomic_address;
template<typename _IntTp>
struct __atomic_base;
}
}
namespace __atomic1
{
using __atomic2::atomic_flag;
using __atomic0::atomic_address;
using __atomic0::__atomic_base;
}
}
/// Lock-free Property
#if defined(_GLIBCXX_ATOMIC_BUILTINS_1) && defined(_GLIBCXX_ATOMIC_BUILTINS_2) \
......@@ -157,7 +160,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#define ATOMIC_INT_LOCK_FREE _GLIBCXX_ATOMIC_PROPERTY
#define ATOMIC_LONG_LOCK_FREE _GLIBCXX_ATOMIC_PROPERTY
#define ATOMIC_LLONG_LOCK_FREE _GLIBCXX_ATOMIC_PROPERTY
#define ATOMIC_ADDRESS_LOCK_FREE _GLIBCXX_ATOMIC_PROPERTY
inline namespace _GLIBCXX_ATOMIC_NAMESPACE { }
......@@ -166,28 +168,28 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
typedef __atomic_base<char> atomic_char;
/// atomic_schar
typedef __atomic_base<signed char> atomic_schar;
typedef __atomic_base<signed char> atomic_schar;
/// atomic_uchar
typedef __atomic_base<unsigned char> atomic_uchar;
typedef __atomic_base<unsigned char> atomic_uchar;
/// atomic_short
typedef __atomic_base<short> atomic_short;
typedef __atomic_base<short> atomic_short;
/// atomic_ushort
typedef __atomic_base<unsigned short> atomic_ushort;
typedef __atomic_base<unsigned short> atomic_ushort;
/// atomic_int
typedef __atomic_base<int> atomic_int;
/// atomic_uint
typedef __atomic_base<unsigned int> atomic_uint;
typedef __atomic_base<unsigned int> atomic_uint;
/// atomic_long
typedef __atomic_base<long> atomic_long;
/// atomic_ulong
typedef __atomic_base<unsigned long> atomic_ulong;
typedef __atomic_base<unsigned long> atomic_ulong;
/// atomic_llong
typedef __atomic_base<long long> atomic_llong;
......@@ -212,50 +214,50 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
typedef __atomic_base<int_least8_t> atomic_int_least8_t;
/// atomic_uint_least8_t
typedef __atomic_base<uint_least8_t> atomic_uint_least8_t;
typedef __atomic_base<uint_least8_t> atomic_uint_least8_t;
/// atomic_int_least16_t
typedef __atomic_base<int_least16_t> atomic_int_least16_t;
typedef __atomic_base<int_least16_t> atomic_int_least16_t;
/// atomic_uint_least16_t
typedef __atomic_base<uint_least16_t> atomic_uint_least16_t;
typedef __atomic_base<uint_least16_t> atomic_uint_least16_t;
/// atomic_int_least32_t
typedef __atomic_base<int_least32_t> atomic_int_least32_t;
typedef __atomic_base<int_least32_t> atomic_int_least32_t;
/// atomic_uint_least32_t
typedef __atomic_base<uint_least32_t> atomic_uint_least32_t;
typedef __atomic_base<uint_least32_t> atomic_uint_least32_t;
/// atomic_int_least64_t
typedef __atomic_base<int_least64_t> atomic_int_least64_t;
typedef __atomic_base<int_least64_t> atomic_int_least64_t;
/// atomic_uint_least64_t
typedef __atomic_base<uint_least64_t> atomic_uint_least64_t;
typedef __atomic_base<uint_least64_t> atomic_uint_least64_t;
/// atomic_int_fast8_t
typedef __atomic_base<int_fast8_t> atomic_int_fast8_t;
/// atomic_uint_fast8_t
typedef __atomic_base<uint_fast8_t> atomic_uint_fast8_t;
typedef __atomic_base<uint_fast8_t> atomic_uint_fast8_t;
/// atomic_int_fast16_t
typedef __atomic_base<int_fast16_t> atomic_int_fast16_t;
typedef __atomic_base<int_fast16_t> atomic_int_fast16_t;
/// atomic_uint_fast16_t
typedef __atomic_base<uint_fast16_t> atomic_uint_fast16_t;
typedef __atomic_base<uint_fast16_t> atomic_uint_fast16_t;
/// atomic_int_fast32_t
typedef __atomic_base<int_fast32_t> atomic_int_fast32_t;
typedef __atomic_base<int_fast32_t> atomic_int_fast32_t;
/// atomic_uint_fast32_t
typedef __atomic_base<uint_fast32_t> atomic_uint_fast32_t;
typedef __atomic_base<uint_fast32_t> atomic_uint_fast32_t;
/// atomic_int_fast64_t
typedef __atomic_base<int_fast64_t> atomic_int_fast64_t;
typedef __atomic_base<int_fast64_t> atomic_int_fast64_t;
/// atomic_uint_fast64_t
typedef __atomic_base<uint_fast64_t> atomic_uint_fast64_t;
typedef __atomic_base<uint_fast64_t> atomic_uint_fast64_t;
/// atomic_intptr_t
......@@ -265,7 +267,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
typedef __atomic_base<uintptr_t> atomic_uintptr_t;
/// atomic_size_t
typedef __atomic_base<size_t> atomic_size_t;
typedef __atomic_base<size_t> atomic_size_t;
/// atomic_intmax_t
typedef __atomic_base<intmax_t> atomic_intmax_t;
......@@ -277,16 +279,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
typedef __atomic_base<ptrdiff_t> atomic_ptrdiff_t;
struct atomic_bool;
#define ATOMIC_VAR_INIT(_VI) { _VI }
template<typename _Tp>
struct atomic;
template<typename _Tp>
struct atomic<_Tp*>;
// @} group atomics
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
} // namespace std
#endif
// { dg-options "-std=gnu++0x" }
// { dg-do compile }
// Copyright (C) 2008, 2009, 2010 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
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <atomic>
#include <cstddef>
int main()
{
std::atomic_address a __attribute__((unused)) = { { NULL } };
return 0;
}
// { dg-options "-std=gnu++0x" }
// { dg-do compile }
// Copyright (C) 2008, 2009 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
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <atomic>
void test01()
{
// Assign.
typedef std::atomic_address test_type;
test_type t1;
test_type t2;
t1 = t2; // { dg-error "deleted" }
}
// { dg-prune-output "include" }
// { dg-do compile }
// { dg-options "-std=gnu++0x" }
// Copyright (C) 2010 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
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <atomic>
#include <testsuite_common_types.h>
int main()
{
__gnu_test::constexpr_single_value_constructible test;
test.operator()<std::atomic_address, void*>();
return 0;
}
// { dg-options "-std=gnu++0x" }
// { dg-do compile }
// Copyright (C) 2008, 2009 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
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <atomic>
void test01()
{
// Copy.
typedef std::atomic_address test_type;
test_type t1;
test_type t2(t1); // { dg-error "deleted" }
}
// { dg-prune-output "include" }
// { dg-options "-std=gnu++0x" }
// Copyright (C) 2008, 2009 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
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <atomic>
int main()
{
// Default constructor.
std::atomic_address a;
return 0;
}
// { dg-options "-std=gnu++0x" }
// Copyright (C) 2008, 2009, 2010 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
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <atomic>
int main()
{
// Single value constructor.
void* v = 0;
std::atomic_address a(v);
return 0;
}
// { dg-options "-std=gnu++0x" }
// { dg-do compile }
// Copyright (C) 2008, 2009 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
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <atomic>
#include <testsuite_common_types.h>
void test01()
{
__gnu_test::standard_layout test;
test.operator()<std::atomic_address>();
}
// { dg-options "-std=gnu++0x" }
// { dg-do compile }
// Copyright (C) 2009 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
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <atomic>
#include <testsuite_common_types.h>
void test01()
{
__gnu_test::has_trivial_cons_dtor test;
test.operator()<std::atomic_address>();
}
......@@ -94,14 +94,6 @@ namespace gnu
# endif
#endif
#ifndef ATOMIC_ADDRESS_LOCK_FREE
# error "ATOMIC_ADDRESS_LOCK_FREE must be a macro"
# if ATOMIC_ADDRESS_LOCK_FREE != 0 \
&& ATOMIC_ADDRESS_LOCK_FREE != 1 && ATOMIC_ADDRESS_LOCK_FREE != 2
# error "ATOMIC_ADDRESS_LOCK_FREE must be 0, 1, or 2"
# endif
#endif
#ifndef ATOMIC_FLAG_INIT
#error "ATOMIC_FLAG_INIT_must_be_a_macro"
#endif
......
// { dg-options "-std=gnu++0x" }
// { dg-do compile }
// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
// Copyright (C) 2008, 2009, 2010, 2011 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
......@@ -72,6 +72,4 @@ void test01()
using std::atomic_ptrdiff_t;
using std::atomic_intmax_t;
using std::atomic_uintmax_t;
using std::atomic_address;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment