This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3] __pool_alloc locking bits


On Friday 25 June 2004 16:07, Richard Earnshaw wrote:
> Ben,
> 	2004-06-24  Benjamin Kosnik  <bkoz@redhat.com>
>
> 	* include/bits/concurrence.h (__gnu_cxx::lock): New.
> 	* include/ext/pool_allocator.h (__pool_base::_Lock::_S_lock): Remove.
> 	(__pool_base::_M_get_mutex): New.
> 	* include/bits/allocator.h: Tweak.
> 	* src/allocator.cc (__pool_base::_M_get_free_list): Correct offset.
> 	* config/linker-map.gnu: Remove __pool_base::_Lock::_S_lock.
> 	* include/bits/stl_threads.h: Remove.
> 	* include/Makefile.am: Also here.
> 	* include/Makefile.in: Regenerate.
>
> 	* src/locale_init.cc: Use __gnu_cxx::lock.
>
> 	* src/allocator.cc: Move all instantiations...
> 	* src/allocator-inst.cc: ...here.
>
> This patch breaks cross-compilation to arm-elf:

The following seems to fix it.

Ok?

Paul

2004-06-25  Paul Brook  <paul@codesourcery.com>

	* include/bits/concurrence.h: Still create mutex object when
	single-threaded.

Index: include/bits/concurrence.h
===================================================================
RCS file: /var/cvsroot/gcc-cvs/gcc/libstdc++-v3/include/bits/concurrence.h,v
retrieving revision 1.4
diff -u -p -r1.4 concurrence.h
--- include/bits/concurrence.h	25 Jun 2004 06:10:43 -0000	1.4
+++ include/bits/concurrence.h	25 Jun 2004 16:08:18 -0000
@@ -56,7 +56,7 @@ __gthread_mutex_lock(&NAME)
 
 #else
 
-# define __glibcxx_mutex_define_initialized(NAME)
+# define __glibcxx_mutex_define_initialized(NAME) __gthread_mutex_t NAME
 # define __glibcxx_mutex_lock(NAME)
 # define __glibcxx_mutex_unlock(NAME)
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]