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] |
Other format: | [Raw text] |
Andrew MacLeod <amacleod@redhat.com> writes:
They are independent as far as dependencies within this compilation unit. The problem is if thread number 2 is performing a.j = val b.i = val2
now there are data races on both A and B if we load/store full words and the struct was something like: struct { char i; char j; } a, b;
The store to B is particularly unpleasant since you may lose one of
the 2 stores. The load data race on A is only in the territory of
hardware or software race detectors.
In this exmaple, if we do a word access to a, then we are running past
So the only potential problem here is if we have two small variables where one is aligned and the other is not. This is an unusual situation because small variables are not normally aligned. We can avoid trouble by forcing an alignment to a word boundary after every aligned variable.
Or so it seems to me.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |