This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: Threaded implementatioon
- To: "Ulrich Drepper" <drepper at cygnus dot com>,"Anthony Williams" <anthony at anthonyw dot cjb dot net>
- Subject: Re: Threaded implementatioon
- From: "Anthony Williams" <anthony_w dot geo at yahoo dot com>
- Date: Fri, 7 Apr 2000 09:54:41 +0100
- Cc: <libstdc++ at sourceware dot cygnus dot com>
- References: <002a01bf9faa$001e0f90$5919cac2@derwent.co.uk> <m3r9ciahgs.fsf@localhost.localnet>
- Reply-To: "Anthony Williams" <anthony at anthonyw dot cjb dot net>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
With some experimentation, I have discovered that the following is
the correct definition of PTHREAD_MUTEX_INITIALIZER on
Sparc-Solaris-2.7:
#define PTHREAD_MUTEX_INITIALIZER {{{0},0},{{{0}}},{0}}
Currently I put this in bits/stl_threads.h immediately after the
#include <pthread.h>
Is this the correct place, or should it go somewhere else?
Anthony
- ----- Original Message -----
From: Ulrich Drepper <drepper@redhat.com>
To: Anthony Williams <anthony@anthonyw.cjb.net>
Cc: <libstdc++@sourceware.cygnus.com>
Sent: 07 April 2000 01:21
Subject: Re: Threaded implementatioon
> "Anthony Williams" <anthony_w.geo@yahoo.com> writes:
>
> > Does anyone know how to get rid of the following warning, which
> > plagues my C++ code when I compile with -pthreads? (gcc &
> > libstdc++-3 are installed in /export/home/cms/localtest )
> >
> >
> > /export/home/cms/localtest/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2
> > ../ ./../../include/g++-v3/bits/stl_threads.h: At top level:
> > /export/home/cms/localtest/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2
> > ../ ./../../include/g++-v3/bits/stl_threads.h: In instantiation
> > of `std::_Swap_lock_struct<0>::_S_swap_lock':
> > /export/home/cms/localtest/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2
> > ../ ./../../include/g++-v3/bits/stl_threads.h:147: instantiated
> > from here
> > /export/home/cms/localtest/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2
> > ../ ./../../include/g++-v3/bits/stl_threads.h:141: warning:
> > aggregate has a partly bracketed initializer
>
> Create an appropriate macro PTHREAD_MUTEX_INITIALIZER with all the
> required brackets. The people at Sun cannot do this so you have to
> do it.
>
> --
> ---------------. drepper at gnu.org ,-. 1325 Chesapeake
> Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale,
> CA 94089 USA Red Hat `--' drepper at redhat.com
> `------------------------
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.1 for non-commercial use <http://www.pgp.com>
iQA/AwUBOO2iT5vw+P4cG5rVEQL52gCg7JnirEqzKIP5xtPgOwK+9q1rCV4AnA2M
W/JnVhgqVELyc8Ed0vzyryl2
=tljP
-----END PGP SIGNATURE-----
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com