[libc++] Fix thread annotations on shared_mutex and shared_timed_mutex
authorLouis Dionne <ldionne.2@gmail.com>
Mon, 3 Jul 2023 15:02:47 +0000 (11:02 -0400)
committerLouis Dionne <ldionne.2@gmail.com>
Thu, 6 Jul 2023 12:37:10 +0000 (08:37 -0400)
commit5b666cf11e7a913fdfd0a65975ff587452635659
treeeb8e2523982fe144c65240279f760ea29a4959a8
parent619c6c0e38a74c0f0de09bed4542887913db98b8
[libc++] Fix thread annotations on shared_mutex and shared_timed_mutex

Based on the comment in https://reviews.llvm.org/D54290#4418958, these
attributes need to be on the top-level functions in order to work
properly. Also, add tests.

Fixes http://llvm.org/PR57035.

Differential Revision: https://reviews.llvm.org/D154354
libcxx/.clang-format
libcxx/include/shared_mutex
libcxx/test/libcxx/thread/thread.shared_mutex/thread_safety.verify.cpp [new file with mode: 0644]
libcxx/test/libcxx/thread/thread.shared_timed_mutex/thread_safety.verify.cpp [new file with mode: 0644]