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

Petr Hosek via libc-commits libc-commits at lists.llvm.org
Wed Jul 10 23:59:02 PDT 2024


================
@@ -1,4 +1,10 @@
 {
+  "errno": {
+    "LIBC_CONF_ERRNO_MODE": {
+      "value": "",
+      "doc": "The implementation used for errno, acceptable values are LIBC_ERRNO_MODE_NONE, LIBC_ERRNO_MODE_INTERNAL, LIBC_ERRNO_MODE_EXTERNAL, LIBC_ERRNO_MODE_THREAD_LOCAL, LIBC_ERRNO_MODE_GLOBAL, and LIBC_ERRNO_MODE_SYSTEM."
----------------
petrhosek wrote:

Do you think it makes sense to distinguish the "shared atomic" and "shared thread unsafe" modes? Right now these are only used by the GPU port which uses the atomic version. Specifically the only reason for the "shared thread unsafe" mode seems to be avoiding the use of atomics, but we already use those elsewhere so I'm not sure how useful that is.

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


More information about the libc-commits mailing list