Roland McGrath 6ad0dcf67f
[libc] Revamp hdrgen command line and build integration (#121522)
This adds a new main command-line entry point for hdrgen, in the
new main.py.  This new interface is used for generating a header.
The old ways of invoking yaml_to_classes.py for other purposes
are left there for now, but `--e` is renamed to `--entry-point`
for consistency with the new CLI.

The YAML schema is expanded with the `header_template` key where
the corresponding `.h.def` file's path is given relative to where
the YAML file is found.  The build integration no longer gives
the `.h.def` path on the command line.  Instead, the script now
emits a depfile that's used by the cmake rules to track that.
The output file is always explicit in the script command line
rather than sometimes being derived from a directory path.
2025-01-07 15:56:12 -08:00

90 lines
1.8 KiB
YAML

header: sched.h
header_template: sched.h.def
macros: []
types:
- type_name: struct_timespec
- type_name: time_t
- type_name: struct_sched_param
- type_name: size_t
- type_name: cpu_set_t
- type_name: pid_t
enums: []
objects: []
functions:
- name: __sched_getcpucount
standards:
- llvm_libc_ext
return_type: int
arguments:
- type: size_t
- type: const cpu_set_t *
- name: sched_get_priority_max
standards:
- POSIX
return_type: int
arguments:
- type: int
- name: sched_get_priority_min
standards:
- POSIX
return_type: int
arguments:
- type: int
- name: sched_getaffinity
standards:
- GNUExtensions
return_type: int
arguments:
- type: pid_t
- type: size_t
- type: cpu_set_t *
- name: sched_getparam
standards:
- POSIX
return_type: int
arguments:
- type: pid_t
- type: struct sched_param *
- name: sched_getscheduler
standards:
- POSIX
return_type: int
arguments:
- type: pid_t
- type: int
- type: const struct sched_param *
- name: sched_rr_get_interval
standards:
- POSIX
return_type: int
arguments:
- type: pid_t
- type: struct timespec *
- name: sched_setaffinity
standards:
- GNUExtensions
return_type: int
arguments:
- type: pid_t
- type: size_t
- type: const cpu_set_t *
- name: sched_setparam
standards:
- POSIX
return_type: int
arguments:
- type: pid_t
- type: const struct sched_param *
- name: sched_setscheduler
standards:
- POSIX
return_type: int
arguments:
- type: pid_t
- name: sched_yield
standards:
- POSIX
return_type: int
arguments:
- type: void