[libc-commits] [libc] [libc][docs] add c11 threads and uchar (PR #119250)
Nick Desaulniers via libc-commits
libc-commits at lists.llvm.org
Mon Dec 9 11:18:19 PST 2024
https://github.com/nickdesaulniers created https://github.com/llvm/llvm-project/pull/119250
FWICT, these were the newly added headers for c11.
>From 8a20f79da7458c104a721a825e75ce7b7c572bc0 Mon Sep 17 00:00:00 2001
From: Nick Desaulniers <ndesaulniers at google.com>
Date: Mon, 9 Dec 2024 11:17:32 -0800
Subject: [PATCH] [libc][docs] add c11 threads and uchar
FWICT, these were the newly added headers for c11.
---
libc/docs/headers/index.rst | 1 +
libc/docs/headers/threads.rst | 20 +++++++-----
libc/docs/headers/uchar.rst | 59 ++++++++++++++++++++++++++++++++++
libc/utils/docgen/threads.json | 19 ++++++-----
libc/utils/docgen/uchar.json | 27 ++++++++++++++++
5 files changed, 110 insertions(+), 16 deletions(-)
create mode 100644 libc/docs/headers/uchar.rst
create mode 100644 libc/utils/docgen/uchar.json
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"
+ }
+ }
+}
More information about the libc-commits
mailing list