[libcxx-commits] [PATCH] D117366: [libcxx][libcxxabi][docs] Document the various places we use threading in libcxx and libcxxabi

Daniel McIntosh via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jan 27 08:07:19 PST 2022


DanielMcIntosh-IBM added a comment.

In D117366#3266416 <https://reviews.llvm.org/D117366#3266416>, @ldionne wrote:

> There's a lot of quite useful information in there. However, it's not clear to me that a "DesignDoc" is the right place to put it. I'm truly scared that this is going to get out of sync with the actual code in no time at all, especially the parts that explain the current implementation of <something>. Instead, would it make sense to improve the in-code documentation of the various parts you describe by adding those descriptions as high-level comments in the code itself, close to the implementation? Then, this design doc can stay higher level and not risk getting out of sync.

That's a good point. When I circle back around to this, I'll move the description of the implementation out of the design doc and into the code where possible, but I worry that some parts of this will be very difficult to explain in a clear and concise manner without getting a little bit into the actual implementation. We'll see how it goes when I actually try moving things.



================
Comment at: libcxx/docs/DesignDocs/InternalThreadSynchronization.rst:95
+
+Static local variables
+----------------------
----------------
ldionne wrote:
> This is usually called a function-local `static` I think? Or is `Static Local Variable` the official naming and I'm using ad-hoc terminology? (that's quite possible)
There doesn't seem to be a whole lot of consistency in terminology as far as I can tell. [cppreference](https://en.cppreference.com/w/cpp/language/storage_duration#Static_local_variables) refers to them as "Static Local Variables", the standard seems to have settled on "block variable with static storage duration" (e.g. [basic.stc.static](https://eel.is/c++draft/basic.stc.static#3)), but has also used "local static variables" on occasion in the past (e.g. [basic.stc.static in the C++14 draft
](https://timsong-cpp.github.io/cppwp/n4140/basic.stc.static#3)).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117366



More information about the libcxx-commits mailing list