brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · e63d7c4 Raw
43 lines · c
1//===-- tsan_flags.h --------------------------------------------*- 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-exception6//7//===----------------------------------------------------------------------===//8//9// This file is a part of ThreadSanitizer (TSan), a race detector.10// NOTE: This file may be included into user code.11//===----------------------------------------------------------------------===//12 13#ifndef TSAN_FLAGS_H14#define TSAN_FLAGS_H15 16#include "sanitizer_common/sanitizer_flags.h"17#include "sanitizer_common/sanitizer_deadlock_detector_interface.h"18 19#if SANITIZER_APPLE && !SANITIZER_GO20enum LockDuringWriteSetting {21  kLockDuringAllWrites,22  kNoLockDuringWritesCurrentProcess,23  kNoLockDuringWritesAllProcesses,24};25#endif26 27namespace __tsan {28 29struct Flags : DDFlags {30#define TSAN_FLAG(Type, Name, DefaultValue, Description) Type Name;31#include "tsan_flags.inc"32#undef TSAN_FLAG33 34  void SetDefaults();35  void ParseFromString(const char *str);36};37 38void InitializeFlags(Flags *flags, const char *env,39                     const char *env_option_name = nullptr);40}  // namespace __tsan41 42#endif  // TSAN_FLAGS_H43