[libc-commits] [PATCH] D148293: [LIBC] Fix incorrect handling of `pthread_join(tid, nullptr)`

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Apr 20 12:28:22 PDT 2023


sivachandra accepted this revision.
sivachandra added a comment.
This revision is now accepted and ready to land.

I am accepting but have also requested changes to reduce the scope of testing even further. I will review your other patch before the end of this week and we can include all kinds of testing in that patch.



================
Comment at: libc/test/integration/src/pthread/pthread_join_test.cpp:29
+
+struct test_thread_args {
+  pthread_t tid;
----------------
Type names not specified by the C/C++ standard should be in `UpperCase` style: https://libc.llvm.org/dev/code_style.html#naming-style


================
Comment at: libc/test/integration/src/pthread/pthread_join_test.cpp:71
+  for (size_t i = 0; i < nthreads; ++i) {
+    ASSERT_EQ(__llvm_libc::pthread_attr_setdetachstate(
+                  &attr, th_args[i].detached ? PTHREAD_CREATE_DETACHED
----------------
Since we do not currently honor attrs, can you move this part to your other patch?


================
Comment at: libc/test/integration/src/pthread/pthread_join_test.cpp:111
+
+static void null_join_test() {
+  pthread_t tid;
----------------
Just keep this in this patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148293



More information about the libc-commits mailing list