This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix sporadic failure in g++.dg/tsan/aligned_vs_unaligned_race.C
- From: Mike Stump <mikestump at comcast dot net>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Bernd Edlinger <bernd dot edlinger at hotmail dot de>, "H.J. Lu" <hjl dot tools at gmail dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Dmitry Vyukov <dvyukov at google dot com>
- Date: Wed, 7 Jan 2015 08:58:04 -0800
- Subject: Re: [PATCH] Fix sporadic failure in g++.dg/tsan/aligned_vs_unaligned_race.C
- Authentication-results: sourceware.org; auth=none
- References: <E67B07D7-6ABA-48C1-B58B-B804144D91C2 at comcast dot net> <D86529BC-DB94-481A-AE60-913D7E2B8D7F at comcast dot net> <DUB118-W1E901D082BACEDE02A5E8E4590 at phx dot gbl> <DUB118-W468072AA78C7E7CD1DCF6BE4590 at phx dot gbl> <20150106091633 dot GF1667 at tucnak dot redhat dot com> <DUB118-W15350AC346C8CE664A5ECDE4590 at phx dot gbl> <DEA45E76-18B8-4FCA-AFE3-718F21DC1CB3 at comcast dot net> <DUB118-W1417B0F343893BD17318BAE4590 at phx dot gbl> <A5E27EC0-33BE-4043-8B5E-07394E68AE41 at comcast dot net> <DUB118-W189C82F5D792A3B997EED5E4460 at phx dot gbl> <20150107082339 dot GN1667 at tucnak dot redhat dot com>
On Jan 7, 2015, at 12:23 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> But I really don't like the busy waiting.
We’ve already determined that sched_sleep isn’t intercepted and can be used to non-busy wait. Any reason not to use it?
> As tsan is only supported on x86_64-linux
So, I hate hardening the code to be overly non-portable when it doesn’t have to be that. There is something enticing to me about the simplicity of sched_sleep.