Skip to content

Commit

Permalink
[compiler-rt] Use zx_futex_wait_deprecated for Fuchsia sanitizer runtime
Browse files Browse the repository at this point in the history
This change is part of the soft-transition to the new synchronization
primitives which implement priority inheritance.

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

llvm-svn: 347279
  • Loading branch information
petrhosek committed Nov 20, 2018
1 parent a36c444 commit 8e0e35a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cc
Expand Up @@ -120,8 +120,8 @@ 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(reinterpret_cast<zx_futex_t *>(m),
MtxSleeping, ZX_TIME_INFINITE);
zx_status_t status = _zx_futex_wait_deprecated(
reinterpret_cast<zx_futex_t *>(m), MtxSleeping, ZX_TIME_INFINITE);
if (status != ZX_ERR_BAD_STATE) // Normal race.
CHECK_EQ(status, ZX_OK);
}
Expand Down

0 comments on commit 8e0e35a

Please sign in to comment.