[PATCH] D14427: [tsan] Implement an invisible barrier in the runtime to make it available on OS X

Kuba Brecka via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 6 01:29:13 PST 2015


kubabrecka created this revision.
kubabrecka added reviewers: dvyukov, kcc, samsonov, glider.
kubabrecka added subscribers: llvm-commits, zaks.anna, ismailp, jasonk, jevinskie.

For the lit tests, we currently have a "TSan-invisible barrier" that is implemented by dlsym-ing `pthread_barrier_wait`.  However, on OS X, pthread barriers are not available, so we need to reimplement them.

This patch proposes to provide `__tsan_invisible_barrier_init` and `__tsan_invisible_barrier_wait` in the TSan runtime, with different implementations based on the platform.  This way, we don't need the dlsym trick.

http://reviews.llvm.org/D14427

Files:
  lib/tsan/rtl/tsan.syms.extra
  lib/tsan/rtl/tsan_interface.h
  lib/tsan/rtl/tsan_platform_linux.cc
  lib/tsan/rtl/tsan_platform_mac.cc
  test/tsan/test.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14427.39494.patch
Type: text/x-patch
Size: 5802 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151106/2761ad04/attachment-0001.bin>


More information about the llvm-commits mailing list