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

Reply via email to