Add hppa*-*-* to dg-error targets at line 5
[official-gcc.git] / libsanitizer / tsan / tsan_spinlock_defs_mac.h
blob1a99a81c030230aa3dee6c812db0f0cfca27bc4a
1 //===-- tsan_spinlock_defs_mac.h -------------------------------===//
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 //===----------------------------------------------------------------------===//
8 //
9 // This file is a part of ThreadSanitizer (TSan), a race detector.
11 // Mac-specific forward-declared function defintions that may be
12 // deprecated in later versions of the OS.
13 // These are needed for interceptors.
15 //===----------------------------------------------------------------------===//
17 #if SANITIZER_APPLE
19 #ifndef TSAN_SPINLOCK_DEFS_MAC_H
20 #define TSAN_SPINLOCK_DEFS_MAC_H
22 #include <stdint.h>
24 extern "C" {
27 Provides forward declarations related to OSSpinLocks on Darwin. These functions are
28 deprecated on macOS version 10.12 and later,
29 and are no longer included in the system headers.
31 However, the symbols are still available on the system, so we provide these forward
32 declarations to prevent compilation errors in tsan_interceptors_mac.cpp, which
33 references these functions when defining TSAN interceptor functions.
36 typedef int32_t OSSpinLock;
38 void OSSpinLockLock(volatile OSSpinLock *__lock);
39 void OSSpinLockUnlock(volatile OSSpinLock *__lock);
40 bool OSSpinLockTry(volatile OSSpinLock *__lock);
44 #endif //TSAN_SPINLOCK_DEFS_MAC_H
45 #endif // SANITIZER_APPLE