threadsafeness at egcs1.0.3 and 1.1

Ulrich Drepper drepper@cygnus.com
Mon Jul 13 06:39:00 GMT 1998


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   `------------------------



More information about the Gcc mailing list