[LIBC] Implement remainder of posix 'sched.h' minus `SCHED_SPORADIC`
authorNoah Goldstein <goldstein.w.n@gmail.com>
Thu, 20 Apr 2023 19:51:10 +0000 (14:51 -0500)
committerNoah Goldstein <goldstein.w.n@gmail.com>
Thu, 20 Apr 2023 19:53:41 +0000 (14:53 -0500)
commit0432b85d8e800439e57642bb25e93c32fa864f5c
treef41bbf81fdb459279eabc7159a8239c42ddcc10c
parentef0949828e15d28a92ea04b84d803f1e05bdb1d6
[LIBC] Implement remainder of posix 'sched.h' minus `SCHED_SPORADIC`

Includes macros:
    linux/SCHED_OTHER // posix req
    linux/SCHED_FIFO // posix req
    linux/SCHED_RR // posix req
    linux/SCHED_BATCH
    linux/SCHED_ISO
    linux/SCHED_IDLE
    linux/SCHED_DEADLINE

Includes types:
    struct sched_param { int sched_priority; }

Includes functions:
    sched_setparam
    sched_getparam
    sched_setscheduler
    sched_getscheduler
    sched_get_priority_max
    sched_get_priority_min
    sched_rr_get_interval

Reviewed By: michaelrj

Differential Revision: https://reviews.llvm.org/D148069
30 files changed:
libc/config/linux/aarch64/entrypoints.txt
libc/config/linux/api.td
libc/config/linux/riscv64/entrypoints.txt
libc/config/linux/x86_64/entrypoints.txt
libc/include/CMakeLists.txt
libc/include/llvm-libc-macros/linux/sched-macros.h
libc/include/llvm-libc-types/CMakeLists.txt
libc/include/llvm-libc-types/struct_sched_param.h [new file with mode: 0644]
libc/spec/linux.td
libc/spec/posix.td
libc/src/sched/CMakeLists.txt
libc/src/sched/linux/CMakeLists.txt
libc/src/sched/linux/sched_get_priority_max.cpp [new file with mode: 0644]
libc/src/sched/linux/sched_get_priority_min.cpp [new file with mode: 0644]
libc/src/sched/linux/sched_getparam.cpp [new file with mode: 0644]
libc/src/sched/linux/sched_getscheduler.cpp [new file with mode: 0644]
libc/src/sched/linux/sched_rr_get_interval.cpp [new file with mode: 0644]
libc/src/sched/linux/sched_setparam.cpp [new file with mode: 0644]
libc/src/sched/linux/sched_setscheduler.cpp [new file with mode: 0644]
libc/src/sched/sched_get_priority_max.h [new file with mode: 0644]
libc/src/sched/sched_get_priority_min.h [new file with mode: 0644]
libc/src/sched/sched_getparam.h [new file with mode: 0644]
libc/src/sched/sched_getscheduler.h [new file with mode: 0644]
libc/src/sched/sched_rr_get_interval.h [new file with mode: 0644]
libc/src/sched/sched_setparam.h [new file with mode: 0644]
libc/src/sched/sched_setscheduler.h [new file with mode: 0644]
libc/test/src/sched/CMakeLists.txt
libc/test/src/sched/get_priority_test.cpp [new file with mode: 0644]
libc/test/src/sched/param_and_scheduler_test.cpp [new file with mode: 0644]
libc/test/src/sched/sched_rr_get_interval_test.cpp [new file with mode: 0644]