Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libc][docs] add c11 threads and uchar #119250

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

nickdesaulniers
Copy link
Member

FWICT, these were the newly added headers for c11.

FWICT, these were the newly added headers for c11.
@llvmbot
Copy link
Member

llvmbot commented Dec 9, 2024

@llvm/pr-subscribers-libc

Author: Nick Desaulniers (nickdesaulniers)

Changes

FWICT, these were the newly added headers for c11.


Full diff: https://github.com/llvm/llvm-project/pull/119250.diff

5 Files Affected:

  • (modified) libc/docs/headers/index.rst (+1)
  • (modified) libc/docs/headers/threads.rst (+12-8)
  • (added) libc/docs/headers/uchar.rst (+59)
  • (modified) libc/utils/docgen/threads.json (+11-8)
  • (added) libc/utils/docgen/uchar.json (+27)
diff --git a/libc/docs/headers/index.rst b/libc/docs/headers/index.rst
index 7a9186a7c66e86..e30d3d8cccdfd4 100644
--- a/libc/docs/headers/index.rst
+++ b/libc/docs/headers/index.rst
@@ -19,3 +19,4 @@ Implementation Status
    strings
    threads
    time
+   uchar
diff --git a/libc/docs/headers/threads.rst b/libc/docs/headers/threads.rst
index 39ee049eb1f8f5..be313c6013b8da 100644
--- a/libc/docs/headers/threads.rst
+++ b/libc/docs/headers/threads.rst
@@ -18,11 +18,15 @@ Macros
     - POSIX.1-2024 Standard Section
   * - ONCE_FLAG_INIT
     -
-    - 7.28.1.3
+    - 7.28.1
     -
   * - TSS_DTOR_ITERATIONS
     -
-    - 7.28.1.3
+    - 7.28.1
+    -
+  * - __STDC_NO_THREADS__
+    -
+    - 7.28.1
     -
 
 Functions
@@ -67,27 +71,27 @@ Functions
     -
   * - mtx_destroy
     - |check|
-    - 7.28.4.1
+    - 7.28.4.2
     -
   * - mtx_init
     - |check|
-    - 7.28.4.2
+    - 7.28.4.3
     -
   * - mtx_lock
     - |check|
-    - 7.28.4.3
+    - 7.28.4.4
     -
   * - mtx_timedlock
     -
-    - 7.28.4.4
+    - 7.28.4.5
     -
   * - mtx_trylock
     -
-    - 7.28.4.5
+    - 7.28.4.6
     -
   * - mtx_unlock
     - |check|
-    - 7.28.4.6
+    - 7.28.4.7
     -
   * - thrd_create
     - |check|
diff --git a/libc/docs/headers/uchar.rst b/libc/docs/headers/uchar.rst
new file mode 100644
index 00000000000000..4645109c8c3785
--- /dev/null
+++ b/libc/docs/headers/uchar.rst
@@ -0,0 +1,59 @@
+.. include:: ../check.rst
+
+=======
+uchar.h
+=======
+
+Macros
+======
+
+.. list-table::
+  :widths: auto
+  :align: center
+  :header-rows: 1
+
+  * - Macro
+    - Implemented
+    - C23 Standard Section
+    - POSIX.1-2024 Standard Section
+  * - __STDC_VERSION_UCHAR_H__
+    -
+    - 7.30.1
+    -
+
+Functions
+=========
+
+.. list-table::
+  :widths: auto
+  :align: center
+  :header-rows: 1
+
+  * - Function
+    - Implemented
+    - C23 Standard Section
+    - POSIX.1-2024 Standard Section
+  * - c16rtomb
+    -
+    - 7.30.2.5
+    -
+  * - c32rtomb
+    -
+    - 7.30.2.7
+    -
+  * - c8rtomb
+    -
+    - 7.30.2.3
+    -
+  * - mbrtoc16
+    -
+    - 7.30.2.4
+    -
+  * - mbrtoc32
+    -
+    - 7.30.2.6
+    -
+  * - mbrtoc8
+    -
+    - 7.30.2.2
+    -
diff --git a/libc/utils/docgen/threads.json b/libc/utils/docgen/threads.json
index 8591cbde55a49a..62c5ff881e42ee 100644
--- a/libc/utils/docgen/threads.json
+++ b/libc/utils/docgen/threads.json
@@ -1,10 +1,13 @@
 {
   "macros": {
+    "__STDC_NO_THREADS__": {
+      "c-definition": "7.28.1"
+    },
     "ONCE_FLAG_INIT": {
-      "c-definition": "7.28.1.3"
+      "c-definition": "7.28.1"
     },
     "TSS_DTOR_ITERATIONS": {
-      "c-definition": "7.28.1.3"
+      "c-definition": "7.28.1"
     }
   },
   "functions": {
@@ -30,22 +33,22 @@
       "c-definition": "7.28.3.6"
     },
     "mtx_destroy": {
-      "c-definition": "7.28.4.1"
+      "c-definition": "7.28.4.2"
     },
     "mtx_init": {
-      "c-definition": "7.28.4.2"
+      "c-definition": "7.28.4.3"
     },
     "mtx_lock": {
-      "c-definition": "7.28.4.3"
+      "c-definition": "7.28.4.4"
     },
     "mtx_timedlock": {
-      "c-definition": "7.28.4.4"
+      "c-definition": "7.28.4.5"
     },
     "mtx_trylock": {
-      "c-definition": "7.28.4.5"
+      "c-definition": "7.28.4.6"
     },
     "mtx_unlock": {
-      "c-definition": "7.28.4.6"
+      "c-definition": "7.28.4.7"
     },
     "thrd_create": {
       "c-definition": "7.28.5.1"
diff --git a/libc/utils/docgen/uchar.json b/libc/utils/docgen/uchar.json
new file mode 100644
index 00000000000000..c7a8764657da60
--- /dev/null
+++ b/libc/utils/docgen/uchar.json
@@ -0,0 +1,27 @@
+{
+  "macros": {
+    "__STDC_VERSION_UCHAR_H__": {
+      "c-definition": "7.30.1"
+    }
+  },
+  "functions": {
+    "mbrtoc8": {
+      "c-definition": "7.30.2.2"
+    },
+    "c8rtomb": {
+      "c-definition": "7.30.2.3"
+    },
+    "mbrtoc16": {
+      "c-definition": "7.30.2.4"
+    },
+    "c16rtomb": {
+      "c-definition": "7.30.2.5"
+    },
+    "mbrtoc32": {
+      "c-definition": "7.30.2.6"
+    },
+    "c32rtomb": {
+      "c-definition": "7.30.2.7"
+    }
+  }
+}

@nickdesaulniers nickdesaulniers merged commit a4e2927 into llvm:main Dec 9, 2024
8 of 9 checks passed
@nickdesaulniers nickdesaulniers deleted the docs_c11 branch December 9, 2024 20:36
broxigarchen pushed a commit to broxigarchen/llvm-project that referenced this pull request Dec 10, 2024
FWICT, these were the newly added headers for c11.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants