diff options
author | vladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925> | 2011-10-24 21:13:56 +0000 |
---|---|---|
committer | vladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925> | 2011-10-24 21:13:56 +0000 |
commit | 4c11f25f8c972bc5bed6d92abe2a0a3e41f499d7 (patch) | |
tree | 56ae16e703b8a380113bf2018520e22d2edd512b /include/gtest/internal/gtest-linked_ptr.h | |
parent | 97ef1c705eb24945cf4a2bca9eafe5357281703b (diff) | |
download | googletest-4c11f25f8c972bc5bed6d92abe2a0a3e41f499d7.tar.gz googletest-4c11f25f8c972bc5bed6d92abe2a0a3e41f499d7.tar.bz2 googletest-4c11f25f8c972bc5bed6d92abe2a0a3e41f499d7.zip |
Expressed the thread-safety annotations in code, replacing the existing comment-based system (by Aaron Jacobs).
Diffstat (limited to 'include/gtest/internal/gtest-linked_ptr.h')
-rw-r--r-- | include/gtest/internal/gtest-linked_ptr.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/gtest/internal/gtest-linked_ptr.h b/include/gtest/internal/gtest-linked_ptr.h index 57147b4e..b1362cd0 100644 --- a/include/gtest/internal/gtest-linked_ptr.h +++ b/include/gtest/internal/gtest-linked_ptr.h @@ -105,8 +105,8 @@ class linked_ptr_internal { // framework. // Join an existing circle. - // L < g_linked_ptr_mutex - void join(linked_ptr_internal const* ptr) { + void join(linked_ptr_internal const* ptr) + GTEST_LOCK_EXCLUDED_(g_linked_ptr_mutex) { MutexLock lock(&g_linked_ptr_mutex); linked_ptr_internal const* p = ptr; @@ -117,8 +117,8 @@ class linked_ptr_internal { // Leave whatever circle we're part of. Returns true if we were the // last member of the circle. Once this is done, you can join() another. - // L < g_linked_ptr_mutex - bool depart() { + bool depart() + GTEST_LOCK_EXCLUDED_(g_linked_ptr_mutex) { MutexLock lock(&g_linked_ptr_mutex); if (next_ == this) return true; |