This is the mail archive of the gcc-patches@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]

Re: [PATCH] Fix sporadic failure in g++.dg/tsan/aligned_vs_unaligned_race.C


On Wed, Jan 07, 2015 at 08:58:04AM -0800, Mike Stump wrote:
> 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.

Well, pthread_barrier_wait and dlopen/dlsym are already used by libtsan and
therefore have to be supported on all the architectures that support tsan.
So that method is as portable as libtsan itself.

	Jakub


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