This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: threadsafeness at egcs1.0.3 and 1.1
- To: egcs at cygnus dot com
- Subject: Re: threadsafeness at egcs1.0.3 and 1.1
- From: Ulrich Drepper <drepper at cygnus dot com>
- Date: 11 Jul 1998 19:47:17 -0700
- Newsgroups: cygnus.egcs
- Organization: Cygnus Solutions
- References: <r2r9ztgjdw.fsf@happy.cygnus.com>, <199807112057.WAA00409.cygnus.egcs@mira.isdn.cs.tu-berlin.de>
- Reply-To: drepper at cygnus dot com (Ulrich Drepper)
martin@mira.isdn.cs.tu-berlin.de (Martin von Loewis) writes:
> This would also simplify linking to non-threaded code: the libgcc2
> __cpp_once function would just call the initializer in the
> non-threaded case.
As I've said, you cannot reimplement the function without knowing
exactly how the thread package used works. If you are not going for
efficiency you can use a mutex which is very expensive and still has
to be adapted for the platform + used thread package. E.g., what
happens on Solaris where two thread packages are in use?
--
---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com `------------------------