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

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jan 24 08:08:25 PST 2022


ldionne requested changes to this revision.
ldionne added a comment.
This revision now requires changes to proceed.

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.



================
Comment at: libcxx/docs/DesignDocs/InternalThreadSynchronization.rst:38
+----------
+To manage the caught and uncaught exception stacks for a thread, the libc++abi uses a
+``__cxa_eh_globals`` structure. A pointer to the ``__cxa_eh_globals`` instance associated with the
----------------



================
Comment at: libcxx/docs/DesignDocs/InternalThreadSynchronization.rst:81
+facet in the ``locale::__imp::facets_`` vector. For reasons described `here
+<https://en.cppreference.com/w/cpp/locale/locale/id/id>`__, ``locale::id::__id_`` is 0 initialized
+at first, and only truly intialized when the corresponding facet is first added to a locale (the
----------------



================
Comment at: libcxx/docs/DesignDocs/InternalThreadSynchronization.rst:95
+
+Static local variables
+----------------------
----------------
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)


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