[PATCH] D50910: [sanitizer] Use private futex operations for BlockingMutex
Kostya Kortchinsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 20 07:58:47 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rCRT340178: [sanitizer] Use private futex operations for BlockingMutex (authored by cryptoad, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D50910?vs=161285&id=161483#toc
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D50910
Files:
lib/sanitizer_common/sanitizer_linux.cc
Index: lib/sanitizer_common/sanitizer_linux.cc
===================================================================
--- lib/sanitizer_common/sanitizer_linux.cc
+++ lib/sanitizer_common/sanitizer_linux.cc
@@ -117,6 +117,9 @@
// <linux/futex.h> is broken on some linux distributions.
const int FUTEX_WAIT = 0;
const int FUTEX_WAKE = 1;
+const int FUTEX_PRIVATE_FLAG = 128;
+const int FUTEX_WAIT_PRIVATE = FUTEX_WAIT | FUTEX_PRIVATE_FLAG;
+const int FUTEX_WAKE_PRIVATE = FUTEX_WAKE | FUTEX_PRIVATE_FLAG;
#endif // SANITIZER_LINUX
// Are we using 32-bit or 64-bit Linux syscalls?
@@ -686,7 +689,8 @@
#elif SANITIZER_NETBSD
sched_yield(); /* No userspace futex-like synchronization */
#else
- internal_syscall(SYSCALL(futex), (uptr)m, FUTEX_WAIT, MtxSleeping, 0, 0, 0);
+ internal_syscall(SYSCALL(futex), (uptr)m, FUTEX_WAIT_PRIVATE, MtxSleeping,
+ 0, 0, 0);
#endif
}
}
@@ -701,7 +705,7 @@
#elif SANITIZER_NETBSD
/* No userspace futex-like synchronization */
#else
- internal_syscall(SYSCALL(futex), (uptr)m, FUTEX_WAKE, 1, 0, 0, 0);
+ internal_syscall(SYSCALL(futex), (uptr)m, FUTEX_WAKE_PRIVATE, 1, 0, 0, 0);
#endif
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50910.161483.patch
Type: text/x-patch
Size: 1195 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180820/ff13d3f9/attachment.bin>
More information about the llvm-commits
mailing list