
Part of https://github.com/llvm/llvm-project/issues/145349. Required to allow `atexit` to work. As part of `HermeticTestUtils.cpp`, there is a reference to `atexit()`, which eventually instantiates an instance of a Mutex. Instead of copying the implementation from `libc/src/__support/threads/gpu/mutex.h`, we allow platforms to select an implementation based on configurations, allowing the GPU and single-threaded baremetal platforms to share an implementation. This can be configured or overridden. Later, when the threading API is more complete, we can add an option to support multithreading (or set it as the default), but having single-threading (in tandem) is in line with other libraries for embedded devices.
libc Documentation ================== The libc documentation is written using the Sphinx documentation generator. It is currently tested with Sphinx 1.1.3. To build the documents into html configure libc with the following cmake options: * -DLLVM_ENABLE_SPHINX=ON * -DLIBC_INCLUDE_DOCS=ON After configuring libc with these options the make rule `docs-libc-html` should be available.