[libc-commits] [libc] [libc][docs] Add sched.h POSIX header documentation (PR #186290)

via libc-commits libc-commits at lists.llvm.org
Thu Mar 12 18:41:51 PDT 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: None (kovan)

<details>
<summary>Changes</summary>

Add YAML metadata for `sched.h` listing all POSIX-mandated macros
(`SCHED_FIFO`, `SCHED_OTHER`, `SCHED_RR`, `SCHED_SPORADIC`) and functions
(`sched_get_priority_max`, `sched_get_priority_min`, `sched_getparam`,
`sched_getscheduler`, `sched_rr_get_interval`, `sched_setparam`,
`sched_setscheduler`, `sched_yield`).

Add `sched` to `index.rst` and `CMakeLists.txt` `docgen_list`.

Verified with `python3 docgen.py sched.h` — generates valid RST with correct POSIX links.

Partial fix for #<!-- -->122006

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


3 Files Affected:

- (modified) libc/docs/CMakeLists.txt (+1) 
- (modified) libc/docs/headers/index.rst (+1) 
- (added) libc/utils/docgen/sched.yaml (+27) 


``````````diff
diff --git a/libc/docs/CMakeLists.txt b/libc/docs/CMakeLists.txt
index 68fe9fc545781..138dd7c7503dd 100644
--- a/libc/docs/CMakeLists.txt
+++ b/libc/docs/CMakeLists.txt
@@ -56,6 +56,7 @@ if (SPHINX_FOUND)
       netinet/in
       # TODO: https://github.com/llvm/llvm-project/issues/123821
       # pthread
+      sched
       setjmp
       signal
       stdbit
diff --git a/libc/docs/headers/index.rst b/libc/docs/headers/index.rst
index 573c5d185f38a..fe5c9e6ea1efd 100644
--- a/libc/docs/headers/index.rst
+++ b/libc/docs/headers/index.rst
@@ -21,6 +21,7 @@ Implementation Status
    math/index.rst
    net/if
    netinet/in
+   sched
    search
    setjmp
    signal
diff --git a/libc/utils/docgen/sched.yaml b/libc/utils/docgen/sched.yaml
new file mode 100644
index 0000000000000..41cdaa585928f
--- /dev/null
+++ b/libc/utils/docgen/sched.yaml
@@ -0,0 +1,27 @@
+macros:
+  SCHED_FIFO:
+    in-latest-posix: ''
+  SCHED_OTHER:
+    in-latest-posix: ''
+  SCHED_RR:
+    in-latest-posix: ''
+  SCHED_SPORADIC:
+    in-latest-posix: ''
+
+functions:
+  sched_get_priority_max:
+    in-latest-posix: ''
+  sched_get_priority_min:
+    in-latest-posix: ''
+  sched_getparam:
+    in-latest-posix: ''
+  sched_getscheduler:
+    in-latest-posix: ''
+  sched_rr_get_interval:
+    in-latest-posix: ''
+  sched_setparam:
+    in-latest-posix: ''
+  sched_setscheduler:
+    in-latest-posix: ''
+  sched_yield:
+    in-latest-posix: ''

``````````

</details>


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


More information about the libc-commits mailing list