diff options
author | Venkatesh Srinivas <venkateshs@chromium.org> | 2021-02-17 17:50:43 -0800 |
---|---|---|
committer | Venkatesh Srinivas <venkateshs@chromium.org> | 2021-02-17 17:50:43 -0800 |
commit | fa412adfe38ffd3f545a0e10139bd20b38b688e9 (patch) | |
tree | ea6cb0fab92cea30099b0a059af7a3e3a736de24 /src/base/low_level_alloc.cc | |
parent | cc496aecb81ee5966c865f3723743ff02046c5ad (diff) | |
download | gperftools-fa412adfe38ffd3f545a0e10139bd20b38b688e9.tar.gz |
Fix thread-safety (annotalysis) annotations
tcmalloc contains some thread-safety annotations; however those
annotations have not been exercised for some time, as they used
macros/attributes only supported by a legacy branch of gcc.
Pull request #1251 converted those macros to support modern
versions of clang; this CR fixes the annotations that were
enabled. For the most part, this just requires re-enabling
annotations on member functions that take/release locks. For the
tcmalloc fork (pre-fork and post-fork) handlers, we mark the
functions as exempt from this analysis, as it takes a dynamic
number of locks.
Diffstat (limited to 'src/base/low_level_alloc.cc')
-rw-r--r-- | src/base/low_level_alloc.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/base/low_level_alloc.cc b/src/base/low_level_alloc.cc index d537d9c..db91155 100644 --- a/src/base/low_level_alloc.cc +++ b/src/base/low_level_alloc.cc @@ -248,7 +248,7 @@ namespace { this->arena_->mu.Lock(); } ~ArenaLock() { RAW_CHECK(this->left_, "haven't left Arena region"); } - void Leave() /*UNLOCK_FUNCTION()*/ { + void Leave() UNLOCK_FUNCTION() { this->arena_->mu.Unlock(); #if 0 if (this->mask_valid_) { |