On Wed, Jan 07, 2015 at 07:21:40PM +0100, Bernd Edlinger wrote:
> Ok, just for completeness, I've got the dlopen finally working:
> RTLD_NOLOAD is not working, but RTLD_LAZY or RTLD_NOW does.

No big deal I guess.

> I am however not sure if I can always use -ldl or have to use some 
> target-dependencies here.

libsanitizer always puts
-lpthread -ldl -lm
into libsanitizer.spec, so I'd say it should be safe and you shouldn't even
need -ldl in dg-additional-options, as merely linking with -fsanitize=thread
should link -ldl in.

> --- barrier.h    (revision 0)
> +++ barrier.h    (working copy)

I think better to name it tsan_barrier.h or otherwise make it
clear what this is for.

> @@ -0,0 +1,12 @@
> +#include <dlfcn.h>
> +
> +static __typeof(pthread_barrier_wait) *barrier_wait;
> +
> +static
> +void barrier_init (pthread_barrier_t *barrier)

And, I'd add unsigned count argument here, and pass it through
pthread_barrier_init, just in case you need more than 2 threads
in some test.

Also, what do you need <sched.h> for?

        Jakub

Reply via email to