Skip to content
Snippets Groups Projects
Commit d8ac7afc authored by Abseil Team's avatar Abseil Team Committed by jueminyang
Browse files

Changes imported from Abseil "staging" branch:

  - 1434dc58cc24e004531a09bcf1491773d9bf789e Copybara clang-format by Juemin Yang <jueminyang@google.com>
  - 6296f0f69b23d406a275b7ce2669ea3b18149bb7 Internal change for git pull request #31 by Juemin Yang <jueminyang@google.com>
  - 539940d88cfdf172b4b916d44225cc42839eeee7 Add internal-only ABSL_INTERNAL_HAVE_TSAN_INTERFACE macro. by Daniel Katz <katzdm@google.com>
  - bf85dda4ffdb4dd15084fb8b8db00281481dee90 Add missing pthread.h include to low_level_alloc.cc. by Derek Mauro <dmauro@google.com>

GitOrigin-RevId: 1434dc58cc24e004531a09bcf1491773d9bf789e
Change-Id: I68d6957b0cac32020e4e34dca3243f2f270a4b9c
parent 0a86ee86
No related branches found
No related tags found
No related merge requests found
...@@ -48,7 +48,7 @@ will be expected to conform to the style outlined ...@@ -48,7 +48,7 @@ will be expected to conform to the style outlined
* Don't fix code style and formatting unless you are already changing that * Don't fix code style and formatting unless you are already changing that
line to address an issue. Formatting of modified lines may be done using line to address an issue. Formatting of modified lines may be done using
`git clang-format`. PRs with irrelevant changes won't be merged. If `git clang-format`. PRs with irrelevant changes won't be merged. If
you do want to fix formatting or style, do that in a separate PR. you do want to fix formatting or style, do that in a separate PR.
* Unless your PR is trivial, you should expect there will be reviewer comments * Unless your PR is trivial, you should expect there will be reviewer comments
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#ifndef ABSL_LOW_LEVEL_ALLOC_MISSING #ifndef ABSL_LOW_LEVEL_ALLOC_MISSING
#ifndef _WIN32 #ifndef _WIN32
#include <pthread.h>
#include <signal.h> #include <signal.h>
#include <sys/mman.h> #include <sys/mman.h>
#include <unistd.h> #include <unistd.h>
......
...@@ -19,7 +19,22 @@ ...@@ -19,7 +19,22 @@
#ifndef ABSL_BASE_INTERNAL_TSAN_MUTEX_INTERFACE_H_ #ifndef ABSL_BASE_INTERNAL_TSAN_MUTEX_INTERFACE_H_
#define ABSL_BASE_INTERNAL_TSAN_MUTEX_INTERFACE_H_ #define ABSL_BASE_INTERNAL_TSAN_MUTEX_INTERFACE_H_
#ifdef THREAD_SANITIZER // ABSL_INTERNAL_HAVE_TSAN_INTERFACE
// Macro intended only for internal use.
//
// Checks whether LLVM Thread Sanitizer interfaces are available.
// First made available in LLVM 5.0 (Sep 2017).
#ifdef ABSL_INTERNAL_HAVE_TSAN_INTERFACE
#error "ABSL_INTERNAL_HAVE_TSAN_INTERFACE cannot be directly set."
#endif
#if defined(THREAD_SANITIZER) && defined(__has_include)
#if __has_include(<sanitizer/tsan_interface.h>)
#define ABSL_INTERNAL_HAVE_TSAN_INTERFACE 1
#endif
#endif
#ifdef ABSL_INTERNAL_HAVE_TSAN_INTERFACE
#include <sanitizer/tsan_interface.h> #include <sanitizer/tsan_interface.h>
#define ABSL_TSAN_MUTEX_CREATE __tsan_mutex_create #define ABSL_TSAN_MUTEX_CREATE __tsan_mutex_create
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment