[compiler-rt] r348236 - [compiler-rt] Use the new zx_futex_wait for Fuchsia sanitizer runtime

Petr Hosek via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 3 20:07:43 PST 2018


Author: phosek
Date: Mon Dec  3 20:07:43 2018
New Revision: 348236

URL: http://llvm.org/viewvc/llvm-project?rev=348236&view=rev
Log:
[compiler-rt] Use the new zx_futex_wait for Fuchsia sanitizer runtime

This finishes the soft-transition to the new primitive that implements
priority inheritance.

Differential Revision: https://reviews.llvm.org/D55244

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_fuchsia.cc

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_fuchsia.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_fuchsia.cc?rev=348236&r1=348235&r2=348236&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_fuchsia.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_fuchsia.cc Mon Dec  3 20:07:43 2018
@@ -120,8 +120,9 @@ void BlockingMutex::Lock() {
   if (atomic_exchange(m, MtxLocked, memory_order_acquire) == MtxUnlocked)
     return;
   while (atomic_exchange(m, MtxSleeping, memory_order_acquire) != MtxUnlocked) {
-    zx_status_t status = _zx_futex_wait_deprecated(
-        reinterpret_cast<zx_futex_t *>(m), MtxSleeping, ZX_TIME_INFINITE);
+    zx_status_t status =
+        _zx_futex_wait(reinterpret_cast<zx_futex_t *>(m), MtxSleeping,
+                       ZX_HANDLE_INVALID, ZX_TIME_INFINITE);
     if (status != ZX_ERR_BAD_STATE)  // Normal race.
       CHECK_EQ(status, ZX_OK);
   }




More information about the llvm-commits mailing list