Expressed the thread-safety annotations in code, replacing the existing comment-based system (by Aaron Jacobs).

This commit is contained in:
vladlosev
2011-10-24 21:13:56 +00:00
parent 97ef1c705e
commit 4c11f25f8c
5 changed files with 51 additions and 36 deletions

View File

@@ -1789,6 +1789,10 @@ typedef TypeWithSize<8>::Int TimeInMillis; // Represents time in milliseconds.
#define GTEST_DEFINE_string_(name, default_val, doc) \
GTEST_API_ ::testing::internal::String GTEST_FLAG(name) = (default_val)
// Thread annotations
#define GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks)
#define GTEST_LOCK_EXCLUDED_(locks)
// Parses 'str' for a 32-bit signed integer. If successful, writes the result
// to *value and returns true; otherwise leaves *value unchanged and returns
// false.