[libcxx-commits] [PATCH] D67466: [libcxx] Annotate shared_mutex with thread annotations

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Aug 9 13:50:04 PDT 2021


ldionne requested changes to this revision.
ldionne added inline comments.
This revision now requires changes to proceed.


================
Comment at: libcxx/test/libcxx/thread/thread.shared_mutex/thread_safety_missing_unlock.fail.cpp:1
+//===----------------------------------------------------------------------===//
+//
----------------
Can we make this a `.verify.cpp` instead?


================
Comment at: libcxx/test/libcxx/thread/thread.shared_mutex/thread_safety_missing_unlock_shared.fail.cpp:1
+//===----------------------------------------------------------------------===//
+//
----------------
`.verify.cpp`


================
Comment at: libcxx/test/libcxx/thread/thread.shared_mutex/thread_safety_requires_capability.fail.cpp:1
+//===----------------------------------------------------------------------===//
+//
----------------
`.verify.cpp`


================
Comment at: libcxx/test/libcxx/thread/thread.shared_mutex/thread_safety_requires_capability.fail.cpp:38-46
+int main(int, char**) {
+  std::thread t1(run);
+  std::thread t2(run);
+ 
+  t1.join();
+  t2.join();
+
----------------
Is this actually required to trigger the error? If not, let's not have a `main` function at all. If so, I don't understand how this works!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67466/new/

https://reviews.llvm.org/D67466



More information about the libcxx-commits mailing list