diff options
Diffstat (limited to 'lib/scudo/scudo_tsd_shared.cpp')
-rw-r--r-- | lib/scudo/scudo_tsd_shared.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/scudo/scudo_tsd_shared.cpp b/lib/scudo/scudo_tsd_shared.cpp index 8853894c00a2f..59ad2549998cc 100644 --- a/lib/scudo/scudo_tsd_shared.cpp +++ b/lib/scudo/scudo_tsd_shared.cpp @@ -1,9 +1,8 @@ //===-- scudo_tsd_shared.cpp ------------------------------------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// /// @@ -84,9 +83,7 @@ ScudoTSD *getTSDAndLockSlow(ScudoTSD *TSD) { } const uptr Precedence = TSDs[Index].getPrecedence(); // A 0 precedence here means another thread just locked this TSD. - if (UNLIKELY(Precedence == 0)) - continue; - if (Precedence < LowestPrecedence) { + if (Precedence && Precedence < LowestPrecedence) { CandidateTSD = &TSDs[Index]; LowestPrecedence = Precedence; } |