]> git.ipfire.org Git - thirdparty/gcc.git/commit - libstdc++-v3/include/debug/unordered_set
debug.cc: Introduce a mutex pool in get_safe_base_mutex.
authorFrançois Dumont <francois.cppdevs@free.fr>
Thu, 25 Nov 2010 20:53:39 +0000 (21:53 +0100)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Thu, 25 Nov 2010 20:53:39 +0000 (20:53 +0000)
commitafe96d415d8a08ec2f428bdea0cfaa88207e4b6e
tree655bd05d685adc6a2c1cc45fb794a00e1ae25b76
parent24e1ee321921eed8f9dc58cd099fd9d0ff090ce4
debug.cc: Introduce a mutex pool in get_safe_base_mutex.

2010-11-25  François Dumont  <francois.cppdevs@free.fr>

* src/debug.cc: Introduce a mutex pool in get_safe_base_mutex.
Move code used to manipulate sequence safe iterators from safe
iterator methods to safe sequence ones. Remove usage of safe iterator
mutex, keep _Safe_iterator_base::_M_get_mutex for library backward
binary compatibility.
* src/Makefile.am: Build debug.cc in gnu++0x mode for _Hash_impl usage.
* src/Makefile.in: Regenerate
* include/debug/safe_base.h: Add _Safe_iterator_base _M_invalidate
and _M_reset. Add _Safe_sequence_base _M_attach, _M_attach_single,
_M_detach and _M_detach_single.
* include/debug.safe_iterator.h, safe_iterator.tcc: Remove
_Safe_iterator _M_invalidate and _M_invalidate_single. Implement all
methods in terms of normal iterators rather than safe ones.
* include/debug/safe_sequence.h: Replace _Safe_sequence
_M_transfe_iter with _M_transfer_from_if taking the source sequence
and a predicate signaling when a safe iterator shall be transfered.
Add _Equal_to predicate.
* include/debug/safe_sequence.tcc: New.
* include/Makefile.am: Adjust.
* include/Makefile.in: Regenerate.
* include/debug/forward_list: Swap safe iterators in move constructor.
Do not invalidate before begin in _M_invalidate_all method.
Reimplement safe methods using normal iterators rather than safe ones.
* include/debug/set.h, unordered_map, multiset.h, vector,
unordered_set, deque, map.h, list, multimap.h: Reimplement safe method
using normal iterators rather than safe ones.
* testsuite/23_containers/forward_list/debug/clear.cc, swap.cc,
move_constructor.cc, splice_after.cc, splice_after1.cc,
splice_after2.cc, splice_after3.cc, splice_after4.cc: New.
* testsuite/23_containers/vector/debug/multithreaded_swap.cc: New.

From-SVN: r167152
30 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/Makefile.am
libstdc++-v3/include/Makefile.in
libstdc++-v3/include/debug/deque
libstdc++-v3/include/debug/forward_list
libstdc++-v3/include/debug/list
libstdc++-v3/include/debug/map.h
libstdc++-v3/include/debug/multimap.h
libstdc++-v3/include/debug/multiset.h
libstdc++-v3/include/debug/safe_base.h
libstdc++-v3/include/debug/safe_iterator.h
libstdc++-v3/include/debug/safe_iterator.tcc
libstdc++-v3/include/debug/safe_sequence.h
libstdc++-v3/include/debug/safe_sequence.tcc [new file with mode: 0644]
libstdc++-v3/include/debug/set.h
libstdc++-v3/include/debug/unordered_map
libstdc++-v3/include/debug/unordered_set
libstdc++-v3/include/debug/vector
libstdc++-v3/src/Makefile.am
libstdc++-v3/src/Makefile.in
libstdc++-v3/src/debug.cc
libstdc++-v3/testsuite/23_containers/forward_list/debug/clear.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/forward_list/debug/move_constructor.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/forward_list/debug/splice_after.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/forward_list/debug/splice_after1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/forward_list/debug/splice_after2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/forward_list/debug/splice_after3.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/forward_list/debug/splice_after4.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/forward_list/debug/swap.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/vector/debug/multithreaded_swap.cc [new file with mode: 0644]