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


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

Re: threadsafeness at egcs1.0.3 and 1.1


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


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