login
Header Space

 
 

Re: Is gcc thread-unsafe?

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Haley <aph@...>
Cc: David Schwartz <davids@...>, Linux Kernel Mailing List <linux-kernel@...>, Tomash Brechko <tomash.brechko@...>
Date: Friday, November 2, 2007 - 11:29 am

On 10/30/07, Andrew Haley <aph@redhat.com> wrote:

There is other important information in the cited text. A.o. it is
explained that register promotion of potentially shared variables can
introduce data races. Or: register promotion can introduce bugs in
multithreaded software when compiled with optimization enabled. Are
there any register promotion transformations implemented in gcc that
can introduce data races in multithreaded software ? This is very
important information both for kernel developers and for developers of
multithreaded userspace applications.

Another conclusion from the cited text is that in contrast with what
was stated before on the gcc mailing list, it is not required to
declare thread-shared variables volatile if that thread-shared data is
consistently protected by calls to locking functions.

Bart Van Assche.
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Is gcc thread-unsafe?, Bart Van Assche, (Fri Oct 26, 10:40 am)
Re: Is gcc thread-unsafe?, Linus Torvalds, (Fri Oct 26, 11:27 am)
Re: Is gcc thread-unsafe?, Linus Torvalds, (Fri Oct 26, 12:28 pm)
Re: Is gcc thread-unsafe?, Bart Van Assche, (Fri Oct 26, 1:07 pm)
Re: Is gcc thread-unsafe?, Alan Cox, (Fri Oct 26, 2:08 pm)
Re: Is gcc thread-unsafe?, Andi Kleen, (Fri Oct 26, 4:39 pm)
Re: Is gcc thread-unsafe?, Linus Torvalds, (Fri Oct 26, 2:14 pm)
Re: Is gcc thread-unsafe?, Andrew Haley, (Fri Oct 26, 1:12 pm)
Re: Is gcc thread-unsafe?, Linus Torvalds, (Fri Oct 26, 1:25 pm)
Re: Is gcc thread-unsafe?, Linus Torvalds, (Fri Oct 26, 11:09 am)
Re: Is gcc thread-unsafe?, Giacomo Catenazzi, (Fri Oct 26, 5:45 pm)
Re: Is gcc thread-unsafe?, Linus Torvalds, (Fri Oct 26, 6:24 pm)
Re: Is gcc thread-unsafe?, Andrew Haley, (Fri Oct 26, 11:34 am)
RE: Is gcc thread-unsafe?, David Schwartz, (Fri Oct 26, 2:06 pm)
RE: Is gcc thread-unsafe?, Andrew Haley, (Tue Oct 30, 6:20 am)
Re: Is gcc thread-unsafe?, Bart Van Assche, (Fri Nov 2, 11:29 am)
RE: Is gcc thread-unsafe?, David Schwartz, (Fri Nov 2, 1:18 pm)
Re: Is gcc thread-unsafe?, Andrew Haley, (Fri Nov 2, 11:38 am)
Re: Is gcc thread-unsafe?, Bart Van Assche, (Sun Nov 4, 11:13 am)
Re: Is gcc thread-unsafe?, Linus Torvalds, (Sun Nov 4, 1:45 pm)
Re: Is gcc thread-unsafe?, Bart Van Assche, (Sun Nov 4, 2:06 pm)
Re: Is gcc thread-unsafe?, Andrew Haley, (Sun Nov 4, 1:58 pm)
speck-geostationary