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: [PATCH][RFC] Remove volatile from data members in libstdc++


On Fri, Jul 14, 2006 at 05:00:53PM -0700, Boehm, Hans wrote:
> Clearly, according to language standards, ordinary loads do not
> guarantee atomicity.  A compiler that always load an int in two halves
> is clearly standard conforming, according to current standards.
> Hopefully you agree?

No, this is incorrect on platforms that define the sig_atomic_t typedef
as int, as many do.  See

http://www.delorie.com/gnu/docs/glibc/libc_496.html

"In practice, you can assume that int and other integer types no longer
than int are atomic. You can also assume that pointer types are atomic;
that is very convenient. Both of these assumptions are true on all of the
machines that the GNU C library supports and on all POSIX systems we know
of."


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