llvm/compiler-rt/lib/gwp_asan/platform_specific/guarded_pool_allocator_tls.h

//===-- guarded_pool_allocator_tls.h ----------------------------*- C++ -*-===//
//
// 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
//
//===----------------------------------------------------------------------===//

#ifndef GWP_ASAN_GUARDED_POOL_ALLOCATOR_TLS_H_
#define GWP_ASAN_GUARDED_POOL_ALLOCATOR_TLS_H_

#include "gwp_asan/definitions.h"

#include <stdint.h>

namespace gwp_asan {
// Pack the thread local variables into a struct to ensure that they're in
// the same cache line for performance reasons. These are the most touched
// variables in GWP-ASan.
struct ThreadLocalPackedVariables {};
static_assert;
} // namespace gwp_asan

#ifdef GWP_ASAN_PLATFORM_TLS_HEADER
#include GWP_ASAN_PLATFORM_TLS_HEADER
#else
namespace gwp_asan {
inline ThreadLocalPackedVariables *getThreadLocals() {}
} // namespace gwp_asan
#endif // GWP_ASAN_PLATFORM_TLS_HEADER

#endif // GWP_ASAN_GUARDED_POOL_ALLOCATOR_TLS_H_