[libc-commits] [libc] [libc] Support configurable errno modes (PR #98287)

Roland McGrath via libc-commits libc-commits at lists.llvm.org
Wed Jul 10 16:34:01 PDT 2024


================
@@ -9,44 +9,91 @@
 #include "libc_errno.h"
 #include "src/__support/CPP/atomic.h"
 
-#ifdef LIBC_TARGET_ARCH_IS_GPU
-// LIBC_THREAD_LOCAL on GPU currently does nothing. So essentially this is just
-// a global errno for gpu to use for now.
+#define LIBC_ERRNO_MODE_UNDEFINED 0x01
----------------
frobtech wrote:

Is the NONE option in the doc string meant to refer to UNDEFINED?

I think even if we do (as we should) have clear explanations for each one in the configure.rst text, it still makes sense for each of these here to have a comment describing what it does.  The comments in this file can be a little more concrete and specific about implementation details in this file, while the doc comments should really talk about the semantic / API / ABI contract rather than the implementation details.

https://github.com/llvm/llvm-project/pull/98287


More information about the libc-commits mailing list