[libc-commits] [PATCH] D134716: [libc] Add implementation of pthread_once.

Michael Jones via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Sep 27 10:21:46 PDT 2022


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

Overall LGTM



================
Comment at: libc/src/__support/threads/linux/callonce.cpp:46
+  if (futex_word->compare_exchange_strong(status, WAITING) ||
+      status == WAITING) {
+    __llvm_libc::syscall(SYS_futex, &futex_word->val, FUTEX_WAIT_PRIVATE,
----------------
you just defined status to be `START`, so this condition seems like it can never be true.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134716



More information about the libc-commits mailing list