[PATCH] D14987: [tsan] Add interceptors for Darwin-specific locking APIs

Kuba Brecka via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 3 04:58:06 PST 2015


kubabrecka added inline comments.

================
Comment at: test/tsan/Darwin/osspinlock-norace.cc:2
@@ +1,3 @@
+// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
+#include <libkern/OSAtomic.h>
+#include <pthread.h>
----------------
`os_lock_lock` actually isn't declared in public headers, so we can't have a test for it without manually declaring the functions and structures.  However, the Obj-C runtime uses os_lock_lock heavily, so any Obj-C code will exercise the wrappers for os_lock_lock.


http://reviews.llvm.org/D14987





More information about the llvm-commits mailing list