-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FWICT, these were the newly added headers for c11.
nickdesaulniers
requested review from
vonosmas,
SchrodingerZhu,
jhuber6,
lntue and
michaelrj-google
December 9, 2024 19:18
@llvm/pr-subscribers-libc Author: Nick Desaulniers (nickdesaulniers) ChangesFWICT, these were the newly added headers for c11. Full diff: https://github.com/llvm/llvm-project/pull/119250.diff 5 Files Affected:
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"
+ }
+ }
+}
|
lntue
approved these changes
Dec 9, 2024
michaelrj-google
approved these changes
Dec 9, 2024
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
FWICT, these were the newly added headers for c11.