[Clang][SME2] Enable multi-vector loads & stores for SME2 (#75821)
[llvm-project.git] / compiler-rt / lib / gwp_asan / platform_specific / mutex_fuchsia.cpp
blob0431a82b4b532e88de211a200199a1e99b815e22
1 //===-- mutex_fuchsia.cpp ---------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "gwp_asan/mutex.h"
11 #include <lib/sync/mutex.h>
13 namespace gwp_asan {
14 void Mutex::lock() __TA_NO_THREAD_SAFETY_ANALYSIS { sync_mutex_lock(&Mu); }
16 bool Mutex::tryLock() __TA_NO_THREAD_SAFETY_ANALYSIS {
17 return sync_mutex_trylock(&Mu) == ZX_OK;
20 void Mutex::unlock() __TA_NO_THREAD_SAFETY_ANALYSIS { sync_mutex_unlock(&Mu); }
21 } // namespace gwp_asan