[libc-commits] [PATCH] D79828: [libc] Add implementation of call_once from threads.h.

Alex Brachet via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed May 13 10:50:39 PDT 2020


abrachet accepted this revision.
abrachet added inline comments.
This revision is now accepted and ready to land.


================
Comment at: libc/test/src/threads/call_once_test.cpp:27
+
+  ::atomic_fetch_add(&thread_count, 1);
+
----------------
I believe the `_Atomic` types let you just do `+= 1` and let the compiler call `atomic_fetch_add4` if needed


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79828





More information about the libc-commits mailing list