diff options
author | aaryanshukla <53713108+aaryanshukla@users.noreply.github.com> | 2024-06-28 08:59:08 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-28 08:59:08 -0700 |
commit | e17b17d86e6a9d2c77b7a63822c26bda2fa05067 (patch) | |
tree | 947fcbdbbc18df0bc5d42bd9fa763d19b00755e1 /libc | |
parent | 061e3aa08e35d2714f8bcda87aacf08e9e21771b (diff) | |
download | llvm-e17b17d86e6a9d2c77b7a63822c26bda2fa05067.zip llvm-e17b17d86e6a9d2c77b7a63822c26bda2fa05067.tar.gz llvm-e17b17d86e6a9d2c77b7a63822c26bda2fa05067.tar.bz2 |
[libc] added yaml_combined files, frontend for new headergen (#96833)
These are the yaml files that have combined functions from different
libraries
Rose will be adding the rest of the yaml in the next pr
Missing assert.yaml -- work in progress
Diffstat (limited to 'libc')
-rw-r--r-- | libc/newhdrgen/class_implementation/classes/function.py | 10 | ||||
-rw-r--r-- | libc/newhdrgen/yaml_combined/ctype.yaml | 103 | ||||
-rw-r--r-- | libc/newhdrgen/yaml_combined/fenv.yaml | 107 | ||||
-rw-r--r-- | libc/newhdrgen/yaml_combined/math.yaml | 1884 | ||||
-rw-r--r-- | libc/newhdrgen/yaml_combined/pthread.yaml | 368 | ||||
-rw-r--r-- | libc/newhdrgen/yaml_combined/sched.yaml | 87 | ||||
-rw-r--r-- | libc/newhdrgen/yaml_combined/signal.yaml | 84 | ||||
-rw-r--r-- | libc/newhdrgen/yaml_combined/stdfix.yaml | 222 | ||||
-rw-r--r-- | libc/newhdrgen/yaml_combined/stdio.yaml | 370 | ||||
-rw-r--r-- | libc/newhdrgen/yaml_combined/stdlib.yaml | 273 | ||||
-rw-r--r-- | libc/newhdrgen/yaml_combined/string.yaml | 302 | ||||
-rw-r--r-- | libc/newhdrgen/yaml_combined/strings.yaml | 58 | ||||
-rw-r--r-- | libc/newhdrgen/yaml_combined/sys_mman.yaml | 118 | ||||
-rw-r--r-- | libc/newhdrgen/yaml_combined/sys_wait.yaml | 33 | ||||
-rw-r--r-- | libc/newhdrgen/yaml_combined/time.yaml | 83 | ||||
-rw-r--r-- | libc/newhdrgen/yaml_to_classes.py | 18 |
16 files changed, 4109 insertions, 11 deletions
diff --git a/libc/newhdrgen/class_implementation/classes/function.py b/libc/newhdrgen/class_implementation/classes/function.py index dc73e0e..3c464e4 100644 --- a/libc/newhdrgen/class_implementation/classes/function.py +++ b/libc/newhdrgen/class_implementation/classes/function.py @@ -16,14 +16,16 @@ class Function: self.standards = standards self.return_type = return_type self.name = name - self.arguments = [arg["type"] for arg in arguments] + self.arguments = [ + arg if isinstance(arg, str) else arg["type"] for arg in arguments + ] self.guard = guard - self.attributes = attributes + self.attributes = attributes or [] def __str__(self): - args_str = ", ".join(self.arguments) attributes_str = " ".join(self.attributes) - result = f"{self.return_type} {self.name}({args_str}){attributes_str};" + arguments_str = ", ".join(self.arguments) + result = f"{self.return_type} {self.name}({arguments_str}){attributes_str};" if self.guard: result = f"#ifdef {self.guard}\n{result}\n#endif // {self.guard}" return result diff --git a/libc/newhdrgen/yaml_combined/ctype.yaml b/libc/newhdrgen/yaml_combined/ctype.yaml new file mode 100644 index 0000000..a4a3048 --- /dev/null +++ b/libc/newhdrgen/yaml_combined/ctype.yaml @@ -0,0 +1,103 @@ +header: ctype.h +macros: [] +types: [] +enums: [] +objects: [] +functions: + - name: isalnum + standards: + - stdc + return_type: int + arguments: + - type: int + - name: isalpha + standards: + - stdc + return_type: int + arguments: + - type: int + - name: isblank + standards: + - stdc + return_type: int + arguments: + - type: int + - name: iscntrl + standards: + - stdc + return_type: int + arguments: + - type: int + - name: isdigit + standards: + - stdc + return_type: int + arguments: + - type: int + - name: isgraph + standards: + - stdc + return_type: int + arguments: + - type: int + - name: islower + standards: + - stdc + return_type: int + arguments: + - type: int + - name: isprint + standards: + - stdc + return_type: int + arguments: + - type: int + - name: ispunct + standards: + - stdc + return_type: int + arguments: + - type: int + - name: isspace + standards: + - stdc + return_type: int + arguments: + - type: int + - name: isupper + standards: + - stdc + return_type: int + arguments: + - type: int + - name: isxdigit + standards: + - stdc + return_type: int + arguments: + - type: int + - name: tolower + standards: + - stdc + return_type: int + arguments: + - type: int + - name: toupper + standards: + - stdc + return_type: int + arguments: + - type: int + functions: + - name: isascii + standards: + - POSIX + return_type: int + arguments: + - type: int + - name: toascii + standards: + - GNUExtensions + return_type: int + arguments: + - type: int diff --git a/libc/newhdrgen/yaml_combined/fenv.yaml b/libc/newhdrgen/yaml_combined/fenv.yaml new file mode 100644 index 0000000..e7ff8cdf --- /dev/null +++ b/libc/newhdrgen/yaml_combined/fenv.yaml @@ -0,0 +1,107 @@ +header: fenv.h +macros: [] +types: + - type_name: fenv_t + - type_name: fexcept_t +enums: [] +objects: [] +functions: + - name: feclearexcept + standards: + - stdc + return_type: int + arguments: + - type: int + - name: fetestexcept + standards: + - stdc + return_type: int + arguments: + - type: int + - name: fetestexceptflag + standards: + - stdc + return_type: int + arguments: + - type: const fexcept_t * + - type: int + - name: feraiseexcept + standards: + - stdc + return_type: int + arguments: + - type: int + - name: fesetround + standards: + - stdc + return_type: int + arguments: + - type: int + - name: fegetround + standards: + - stdc + return_type: int + arguments: [] + - name: fegetenv + standards: + - stdc + return_type: int + arguments: + - type: fenv_t * + - name: fesetenv + standards: + - stdc + return_type: int + arguments: + - type: const fenv_t * + - name: fegetexceptflag + standards: + - stdc + return_type: int + arguments: + - type: fexcept_t * + - type: int + - name: fesetexcept + standards: + - stdc + return_type: int + arguments: + - type: int + - name: fesetexceptflag + standards: + - stdc + return_type: int + arguments: + - type: const fexcept_t * + - type: int + - name: feholdexcept + standards: + - stdc + return_type: int + arguments: + - type: fenv_t * + - name: feupdateenv + standards: + - stdc + return_type: int + arguments: + - type: const fenv_t * + - name: fedisableexcept + standards: + - GNUExtensions + return_type: int + arguments: + - type: int + guard: null + - name: feenableexcept + standards: + - GNUExtensions + return_type: int + arguments: + - type: int + attributes: [] + - name: fegetexcept + standards: + - GNUExtensions + return_type: int + arguments: [] diff --git a/libc/newhdrgen/yaml_combined/math.yaml b/libc/newhdrgen/yaml_combined/math.yaml new file mode 100644 index 0000000..dbb1e6e --- /dev/null +++ b/libc/newhdrgen/yaml_combined/math.yaml @@ -0,0 +1,1884 @@ +header: math.h +macros: [] +types: + - type_name: float_t + - type_name: double_t + - type_name: float128 +enums: [] +objects: [] +functions: + - name: copysign + standards: + - stdc + return_type: double + arguments: + - type: double + - type: double + - name: copysignf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: float + - name: copysignl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - name: copysignf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: copysignf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: ceil + standards: + - stdc + return_type: double + arguments: + - type: double + - name: ceilf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: ceill + standards: + - stdc + return_type: long double + arguments: + - type: long double + - name: ceilf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: ceilf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fabs + standards: + - stdc + return_type: double + arguments: + - type: double + attributes: + - __LIBC_CONST_ATTR + - name: fabsf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: fabsl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - name: fabsf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fabsf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fdim + standards: + - stdc + return_type: double + arguments: + - type: double + - type: double + - name: fdimf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: float + - name: fdiml + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - name: fdimf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fdimf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: floor + standards: + - stdc + return_type: double + arguments: + - type: double + - name: floorf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: floorl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - name: floorf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: floorf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fmin + standards: + - stdc + return_type: double + arguments: + - type: double + - type: double + - name: fminf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: float + - name: fminl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - name: fminf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fminf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + - name: fmax + standards: + - stdc + return_type: double + arguments: + - type: double + - type: double + - name: fmaxf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: float + - name: fmaxl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - name: fmaxf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fmaxf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + - name: fmaximum + standards: + - stdc + return_type: double + arguments: + - type: double + - type: double + - name: fmaximumf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: float + - name: fmaximuml + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - name: fmaximumf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fmaximumf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fmaximum_num + standards: + - stdc + return_type: double + arguments: + - type: double + - type: double + - name: fmaximum_numf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: float + - name: fmaximum_numl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - name: fmaximum_numf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fmaximum_numf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fmaximum_mag + standards: + - stdc + return_type: double + arguments: + - type: double + - type: double + - name: fmaximum_magf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: float + - name: fmaximum_magl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - name: fmaximum_magf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fmaximum_magf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fmaximum_mag_num + standards: + - stdc + return_type: double + arguments: + - type: double + - type: double + - name: fmaximum_mag_numf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: float + - name: fmaximum_mag_numl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - name: fmaximum_mag_numf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fmaximum_mag_numf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fminimum + standards: + - stdc + return_type: double + arguments: + - type: double + - type: double + - name: fminimumf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: float + - name: fminimuml + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - name: fminimumf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fminimumf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fminimum_num + standards: + - stdc + return_type: double + arguments: + - type: double + - type: double + - name: fminimum_numf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: float + - name: fminimum_numl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - name: fminimum_numf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fminimum_numf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fminimum_mag + standards: + - stdc + return_type: double + arguments: + - type: double + - type: double + - name: fminimum_magf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: float + - name: fminimum_magl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - name: fminimum_magf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fminimum_magf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fminimum_mag_num + standards: + - stdc + return_type: double + arguments: + - type: double + - type: double + - name: fminimum_mag_numf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: float + - name: fminimum_mag_numl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - name: fminimum_mag_numf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fminimum_mag_numf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fma + standards: + - stdc + return_type: double + arguments: + - type: double + - type: double + - type: double + - name: fmaf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: float + - type: float + - name: f16fmaf + standards: + - stdc + return_type: _Float16 + arguments: + - type: float + - type: float + - type: float + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fmod + standards: + - stdc + return_type: double + arguments: + - type: double + - type: double + - name: fmodf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: float + - name: fmodl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - name: fmodf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fmodf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: frexp + standards: + - stdc + return_type: double + arguments: + - type: double + - type: int * + - name: frexpf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: int * + - name: frexpl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: int * + - name: frexpf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: int * + guard: LIBC_TYPES_HAS_FLOAT16 + - name: frexpf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: int * + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fromfp + standards: + - stdc + return_type: double + arguments: + - type: double + - type: int + - type: unsigned int + - name: fromfpf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: int + - type: unsigned int + - name: fromfpl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: int + - type: unsigned int + - name: fromfpf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: int + - type: unsigned int + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fromfpf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: int + - type: unsigned int + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fromfpx + standards: + - stdc + return_type: double + arguments: + - type: double + - type: int + - type: unsigned int + - name: fromfpxf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: int + - type: unsigned int + - name: fromfpxl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: int + - type: unsigned int + - name: fromfpxf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: int + - type: unsigned int + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fromfpxf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: int + - type: unsigned int + guard: LIBC_TYPES_HAS_FLOAT128 + - name: ufromfp + standards: + - stdc + return_type: double + arguments: + - type: double + - type: int + - type: unsigned int + - name: ufromfpf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: int + - type: unsigned int + - name: ufromfpl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: int + - type: unsigned int + - name: ufromfpf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: int + - type: unsigned int + guard: LIBC_TYPES_HAS_FLOAT16 + - name: ufromfpf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: int + - type: unsigned int + guard: LIBC_TYPES_HAS_FLOAT128 + - name: ufromfpx + standards: + - stdc + return_type: double + arguments: + - type: double + - type: int + - type: unsigned int + - name: ufromfpxf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: int + - type: unsigned int + - name: ufromfpxl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: int + - type: unsigned int + - name: ufromfpxf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: int + - type: unsigned int + guard: LIBC_TYPES_HAS_FLOAT16 + - name: ufromfpxf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: int + - type: unsigned int + guard: LIBC_TYPES_HAS_FLOAT128 + - name: hypot + standards: + - stdc + return_type: double + arguments: + - type: double + - type: double + - name: hypotf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: float + - name: ilogb + standards: + - stdc + return_type: int + arguments: + - type: double + - name: ilogbf + standards: + - stdc + return_type: int + arguments: + - type: float + - name: ilogbl + standards: + - stdc + return_type: int + arguments: + - type: long double + - name: ilogbf16 + standards: + - stdc + return_type: int + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: ilogbf128 + standards: + - stdc + return_type: int + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: llogb + standards: + - stdc + return_type: long + arguments: + - type: double + - name: llogbf + standards: + - stdc + return_type: long + arguments: + - type: float + - name: llogbl + standards: + - stdc + return_type: long + arguments: + - type: long double + - name: llogbf16 + standards: + - stdc + return_type: long + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: llogbf128 + standards: + - stdc + return_type: long + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: ldexp + standards: + - stdc + return_type: double + arguments: + - type: double + - type: int + - name: ldexpf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: int + - name: ldexpl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: int + - name: ldexpf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: int + guard: LIBC_TYPES_HAS_FLOAT128 + - name: log10 + standards: + - stdc + return_type: double + arguments: + - type: double + - name: log10f + standards: + - stdc + return_type: float + arguments: + - type: float + - name: log1p + standards: + - stdc + return_type: double + arguments: + - type: double + - name: log1pf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: log2 + standards: + - stdc + return_type: double + arguments: + - type: double + - name: log2f + standards: + - stdc + return_type: float + arguments: + - type: float + - name: log + standards: + - stdc + return_type: double + arguments: + - type: double + - name: logf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: log1p + standards: + - stdc + return_type: double + arguments: + - type: double + - name: log1pf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: log2 + standards: + - stdc + return_type: double + arguments: + - type: double + - name: log2f + standards: + - stdc + return_type: float + arguments: + - type: float + - name: logb + standards: + - stdc + return_type: double + arguments: + - type: double + - name: logbf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: logbl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - name: logbf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: logbf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: modf + standards: + - stdc + return_type: double + arguments: + - type: double + - type: double * + - name: modff + standards: + - stdc + return_type: float + arguments: + - type: float + - type: float * + - name: modfl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double * + - name: modff16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 * + guard: LIBC_TYPES_HAS_FLOAT16 + - name: modff128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 * + guard: LIBC_TYPES_HAS_FLOAT128 + - name: cos + standards: + - stdc + return_type: double + arguments: + - type: double + - name: cosf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: sin + standards: + - stdc + return_type: double + arguments: + - type: double + - name: sincosf + standards: + - gnu + return_type: void + arguments: + - type: float + - type: float * + - type: float * + - name: sinf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: tan + standards: + - stdc + return_type: double + arguments: + - type: double + - name: tanf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: erff + standards: + - stdc + return_type: float + arguments: + - type: float + - name: exp + standards: + - stdc + return_type: double + arguments: + - type: double + - name: expf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: exp2 + standards: + - stdc + return_type: double + arguments: + - type: double + - name: exp2f + standards: + - stdc + return_type: float + arguments: + - type: float + - name: exp2m1f + standards: + - stdc + return_type: float + arguments: + - type: float + - name: expm1 + standards: + - stdc + return_type: double + arguments: + - type: double + - name: expm1f + standards: + - stdc + return_type: float + arguments: + - type: float + - name: exp10 + standards: + - stdc + return_type: double + arguments: + - type: double + - name: exp10f + standards: + - stdc + return_type: float + arguments: + - type: float + - name: remainder + standards: + - stdc + return_type: double + arguments: + - type: double + - type: double + - name: remainderf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: float + - name: remainderl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - name: remainderf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: remquo + standards: + - stdc + return_type: double + arguments: + - type: double + - type: double + - type: int * + - name: remquof + standards: + - stdc + return_type: float + arguments: + - type: float + - type: float + - type: int * + - name: remquol + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - type: int * + - name: remquof16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + - type: int * + guard: LIBC_TYPES_HAS_FLOAT16 + - name: remquof128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + - type: int * + guard: LIBC_TYPES_HAS_FLOAT128 + - name: round + standards: + - stdc + return_type: double + arguments: + - type: double + - name: roundf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: roundl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - name: roundf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: roundf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: roundeven + standards: + - stdc + return_type: double + arguments: + - type: double + - name: roundevenf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: roundevenl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - name: roundevenf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: roundevenf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: lround + standards: + - stdc + return_type: long + arguments: + - type: double + - name: lroundf + standards: + - stdc + return_type: long + arguments: + - type: float + - name: lroundl + standards: + - stdc + return_type: long + arguments: + - type: long double + - name: lroundf16 + standards: + - stdc + return_type: long + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: lroundf128 + standards: + - stdc + return_type: long + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: llround + standards: + - stdc + return_type: Longlong + arguments: + - type: double + - name: llroundf + standards: + - stdc + return_type: Longlong + arguments: + - type: float + - name: llroundl + standards: + - stdc + return_type: Longlong + arguments: + - type: long double + - name: llroundf16 + standards: + - stdc + return_type: Longlong + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: llroundf128 + standards: + - stdc + return_type: Longlong + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: rint + standards: + - stdc + return_type: double + arguments: + - type: double + - name: rintf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: rintl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - name: rintf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: rintf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: lrint + standards: + - stdc + return_type: long + arguments: + - type: double + - name: lrintf + standards: + - stdc + return_type: long + arguments: + - type: float + - name: lrintl + standards: + - stdc + return_type: long + arguments: + - type: long double + - name: lrintf16 + standards: + - stdc + return_type: long + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: lrintf128 + standards: + - stdc + return_type: long + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: llrint + standards: + - stdc + return_type: Longlong + arguments: + - type: double + - name: llrintf + standards: + - stdc + return_type: Longlong + arguments: + - type: float + - name: llrintl + standards: + - stdc + return_type: Longlong + arguments: + - type: long double + - name: llrintf16 + standards: + - stdc + return_type: Longlong + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: llrintf128 + standards: + - stdc + return_type: Longlong + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: sqrt + standards: + - stdc + return_type: double + arguments: + - type: double + - name: sqrtf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: sqrtl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - name: sqrtf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: trunc + standards: + - stdc + return_type: double + arguments: + - type: double + - name: truncf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: truncl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - name: truncf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: truncf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: nearbyint + standards: + - stdc + return_type: double + arguments: + - type: double + - name: nearbyintf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: nearbyintl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - name: nearbyintf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: nearbyintf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: nextafterf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: float + - name: nextafter + standards: + - stdc + return_type: double + arguments: + - type: double + - type: double + - name: nextafterl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - name: nextafterf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: nextafterf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: nexttowardf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: long double + - name: nexttoward + standards: + - stdc + return_type: double + arguments: + - type: double + - type: long double + - name: nexttowardl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - name: nexttowardf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: nextdown + standards: + - stdc + return_type: double + arguments: + - type: double + - name: nextdownf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: nextdownl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - name: nextdownf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: nextdownf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: nextup + standards: + - stdc + return_type: double + arguments: + - type: double + - name: nextupf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: nextupl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - name: nextupf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: nextupf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: powf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: float + - name: pow + standards: + - stdc + return_type: double + arguments: + - type: double + - type: double + - name: coshf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: sinhf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: tanhf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: acosf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: asinf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: asin + standards: + - stdc + return_type: double + arguments: + - type: double + - name: atanf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: atan2f + standards: + - stdc + return_type: float + arguments: + - type: float + - type: float + - name: acoshf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: asinhf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: atanhf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: scalbn + standards: + - stdc + return_type: double + arguments: + - type: double + - type: int + - name: scalbnf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: int + - name: scalbnl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: int + - name: scalbnf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: int + guard: LIBC_TYPES_HAS_FLOAT128 + - name: nanf + standards: + - stdc + return_type: float + arguments: + - type: const char * + - name: nan + standards: + - stdc + return_type: double + arguments: + - type: const char * + - name: nanl + standards: + - stdc + return_type: long double + arguments: + - type: const char * + - name: nanf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: const char * + guard: LIBC_TYPES_HAS_FLOAT16 + - name: nanf128 + standards: + - stdc + return_type: float128 + arguments: + - type: const char * + guard: LIBC_TYPES_HAS_FLOAT128 + - name: canonicalize + standards: + - stdc + return_type: int + arguments: + - type: double + - type: double + - name: canonicalizef + standards: + - stdc + return_type: int + arguments: + - type: float + - type: float + - name: canonicalizel + standards: + - stdc + return_type: int + arguments: + - type: long double + - type: long double + - name: canonicalizef16 + standards: + - stdc + return_type: int + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: canonicalizef128 + standards: + - stdc + return_type: int + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: totalorderf16 + standards: + - stdc + return_type: int + arguments: + - type: _Float16 * + - type: _Float16 * + guard: LIBC_TYPES_HAS_FLOAT16 + - name: totalordermagf16 + standards: + - stdc + return_type: int + arguments: + - type: _Float16 * + - type: _Float16 * + guard: LIBC_TYPES_HAS_FLOAT16 + - name: f16sqrtf + standards: + - stdc + return_type: _Float16 + arguments: + - type: float + guard: LIBC_TYPES_HAS_FLOAT16 diff --git a/libc/newhdrgen/yaml_combined/pthread.yaml b/libc/newhdrgen/yaml_combined/pthread.yaml new file mode 100644 index 0000000..5a1ede3 --- /dev/null +++ b/libc/newhdrgen/yaml_combined/pthread.yaml @@ -0,0 +1,368 @@ +header: pthread.h +macros: [] +types: + - type_name: pthread_t + - type_name: pthread_once_t + - type_name: pthread_mutex_t + - type_name: pthread_mutexattr_t + - type_name: pthread_key_t + - type_name: pthread_condattr_t + - type_name: __pthread_tss_dtor_t + - type_name: pthread_rwlockattr_t + - type_name: pthread_attr_t + - type_name: __pthread_start_t + - type_name: __pthread_once_func_t + - type_name: __atfork_callback_t +enums: + - name: PTHREAD_CREATE_JOINABLE + value: 0x0 + - name: PTHREAD_CREATE_DETACHED + value: 0x1 + - name: PTHREAD_MUTEX_NORMAL + value: 0x0 + - name: PTHREAD_MUTEX_ERRORCHECK + value: 0x1 + - name: PTHREAD_MUTEX_RECURSIVE + value: 0x2 + - name: PTHREAD_MUTEX_DEFAULT + value: 0x0 + - name: PTHREAD_PROCESS_PRIVATE + value: 0x0 + - name: PTHREAD_PROCESS_SHARED + value: 0x1 + - name: PTHREAD_MUTEX_STALLED + value: 0x0 + - name: PTHREAD_MUTEX_ROBUST + value: 0x1 + - name: PTHREAD_RWLOCK_PREFER_READER_NP + value: 0 + - name: PTHREAD_RWLOCK_PREFER_WRITER_NP + value: 1 + - name: PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP + value: 2 +functions: + - name: pthread_atfork + standards: + - POSIX + return_type: int + arguments: + - type: __atfork_callback_t + - type: __atfork_callback_t + - type: __atfork_callback_t + - name: pthread_attr_destroy + standards: + - POSIX + return_type: int + arguments: + - type: pthread_attr_t * + - name: pthread_attr_init + standards: + - POSIX + return_type: int + arguments: + - type: pthread_attr_t * + - name: pthread_attr_getdetachstate + standards: + - POSIX + return_type: int + arguments: + - type: const pthread_attr_t * + - type: int * + - name: pthread_attr_getguardsize + standards: + - POSIX + return_type: int + arguments: + - type: const pthread_attr_t * __restrict + - type: size_t * __restrict + - name: pthread_attr_getstack + standards: + - POSIX + return_type: int + arguments: + - type: const pthread_attr_t * __restrict + - type: void * * __restrict + - type: size_t * __restrict + - name: pthread_attr_getstacksize + standards: + - POSIX + return_type: int + arguments: + - type: const pthread_attr_t * __restrict + - type: size_t * __restrict + - name: pthread_attr_setdetachstate + standards: + - POSIX + return_type: int + arguments: + - type: pthread_attr_t * + - type: int + - name: pthread_attr_setguardsize + standards: + - POSIX + return_type: int + arguments: + - type: pthread_attr_t * + - type: size_t + - name: pthread_attr_setstack + standards: + - POSIX + return_type: int + arguments: + - type: pthread_attr_t * + - type: void * + - type: size_t + - name: pthread_attr_setstacksize + standards: + - POSIX + return_type: int + arguments: + - type: pthread_attr_t * + - type: size_t + - name: pthread_condattr_destroy + standards: + - POSIX + return_type: int + arguments: + - type: pthread_condattr_t * + - name: pthread_condattr_getclock + standards: + - POSIX + return_type: int + arguments: + - type: const pthread_condattr_t * __restrict + - type: clockid_t * __restrict + - name: pthread_condattr_getpshared + standards: + - POSIX + return_type: int + arguments: + - type: const pthread_condattr_t * __restrict + - type: int * __restrict + - name: pthread_condattr_init + standards: + - POSIX + return_type: int + arguments: + - type: pthread_condattr_t * + - name: pthread_condattr_setclock + standards: + - POSIX + return_type: int + arguments: + - type: pthread_condattr_t * + - type: clockid_t + - name: pthread_condattr_setpshared + standards: + - POSIX + return_type: int + arguments: + - type: pthread_condattr_t * + - type: int + - name: pthread_create + standards: + - POSIX + return_type: int + arguments: + - type: pthread_t * __restrict + - type: const pthread_attr_t * __restrict + - type: __pthread_start_t + - type: void * + - name: pthread_detach + standards: + - POSIX + return_type: int + arguments: + - type: pthread_t + - name: pthread_equal + standards: + - POSIX + return_type: int + arguments: + - type: pthread_t + - type: pthread_t + - name: pthread_exit + standards: + - POSIX + return_type: __Noreturn void + arguments: + - type: void * + - name: pthread_getname_np + standards: + - GNUExtensions + return_type: int + arguments: + - type: pthread_t + - type: char * + - type: size_t + - name: pthread_getspecific + standards: + - POSIX + return_type: void * + arguments: + - type: pthread_key_t + - name: pthread_join + standards: + - POSIX + return_type: int + arguments: + - type: pthread_t + - type: void * * + - name: pthread_key_create + standards: + - POSIX + return_type: int + arguments: + - type: pthread_key_t * + - type: __pthread_tss_dtor_t + - name: pthread_key_delete + standards: + - POSIX + return_type: int + arguments: + - type: pthread_key_t + - name: pthread_self + standards: + - POSIX + return_type: pthread_t + arguments: [] + - name: pthread_setname_np + standards: + - GNUExtensions + return_type: int + arguments: + - type: pthread_t + - type: const char * + - name: pthread_mutex_destroy + standards: + - POSIX + return_type: int + arguments: + - type: pthread_mutex_t * + - name: pthread_mutex_init + standards: + - POSIX + return_type: int + arguments: + - type: pthread_mutex_t * __restrict + - type: const pthread_mutexattr_t * __restrict + - name: pthread_mutex_lock + standards: + - POSIX + return_type: int + arguments: + - type: pthread_mutex_t * + - name: pthread_mutex_unlock + standards: + - POSIX + return_type: int + arguments: + - type: pthread_mutex_t * + - name: pthread_mutexattr_destroy + standards: + - POSIX + return_type: int + arguments: + - type: pthread_mutexattr_t * + - name: pthread_mutexattr_init + standards: + - POSIX + return_type: int + arguments: + - type: pthread_mutexattr_t * + - name: pthread_mutexattr_getpshared + standards: + - POSIX + return_type: int + arguments: + - type: const pthread_mutexattr_t * __restrict + - type: int * __restrict + - name: pthread_mutexattr_getrobust + standards: + - POSIX + return_type: int + arguments: + - type: const pthread_mutexattr_t * __restrict + - type: int * __restrict + - name: pthread_mutexattr_gettype + standards: + - POSIX + return_type: int + arguments: + - type: const pthread_mutexattr_t * __restrict + - type: int * __restrict + - name: pthread_mutexattr_setpshared + standards: + - POSIX + return_type: int + arguments: + - type: pthread_mutexattr_t * __restrict + - type: int + - name: pthread_mutexattr_setrobust + standards: + - POSIX + return_type: int + arguments: + - type: pthread_mutexattr_t * __restrict + - type: int + - name: pthread_mutexattr_settype + standards: + - POSIX + return_type: int + arguments: + - type: pthread_mutexattr_t * __restrict + - type: int + - name: pthread_once + standards: + - POSIX + return_type: int + arguments: + - type: pthread_once_t * + - type: __pthread_once_func_t + - name: pthread_rwlockattr_destroy + standards: + - POSIX + return_type: int + arguments: + - type: pthread_rwlockattr_t * + - name: pthread_rwlockattr_getkind_np + standards: + - POSIX + return_type: int + arguments: + - type: pthread_rwlockattr_t * + - type: int * + - name: pthread_rwlockattr_getpshared + standards: + - POSIX + return_type: int + arguments: + - type: const pthread_rwlockattr_t * + - type: int * + - name: pthread_rwlockattr_init + standards: + - POSIX + return_type: int + arguments: + - type: pthread_rwlockattr_t * + - name: pthread_rwlockattr_setkind_np + standards: + - POSIX + return_type: int + arguments: + - type: pthread_rwlockattr_t * + - type: int + - name: pthread_rwlockattr_setpshared + standards: + - POSIX + return_type: int + arguments: + - type: pthread_rwlockattr_t * + - type: int + - name: pthread_setspecific + standards: + - POSIX + return_type: void * + arguments: + - type: pthread_key_t + - type: const void * diff --git a/libc/newhdrgen/yaml_combined/sched.yaml b/libc/newhdrgen/yaml_combined/sched.yaml new file mode 100644 index 0000000..11a55b7 --- /dev/null +++ b/libc/newhdrgen/yaml_combined/sched.yaml @@ -0,0 +1,87 @@ +header: sched.h +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_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: [] + - name: __sched_getcpucount + standards: + - llvm_libc_ext + return_type: int + arguments: + - type: size_t + - type: const cpu_set_t * diff --git a/libc/newhdrgen/yaml_combined/signal.yaml b/libc/newhdrgen/yaml_combined/signal.yaml new file mode 100644 index 0000000..a952734 --- /dev/null +++ b/libc/newhdrgen/yaml_combined/signal.yaml @@ -0,0 +1,84 @@ +header: signal.h +macros: + - macro_name: __need_size_t + macro_value: null +types: + - type_name: pid_t + - type_name: stack_t + - type_name: siginfo_t + - type_name: struct_sigaction + - type_name: sigset_t + - type_name: union_sigval + - type_name: sig_atomic_t +enums: [] +objects: [] +functions: + - name: raise + standards: + - stdc + return_type: int + arguments: + - type: int + - name: kill + standards: + - POSIX + return_type: int + arguments: + - type: pid_t + - type: int + - name: sigaction + standards: + - POSIX + return_type: int + arguments: + - type: int + - type: const struct sigaction * __restrict + - type: struct sigaction * __restrict + - name: sigaltstack + standards: + - POSIX + return_type: int + arguments: + - type: const stack_t * __restrict + - type: stack_t * __restrict + - name: sigdelset + standards: + - POSIX + return_type: int + arguments: + - type: sigset_t * + - type: int + - name: sigaddset + standards: + - POSIX + return_type: int + arguments: + - type: sigset_t * + - type: int + - name: sigemptyset + standards: + - POSIX + return_type: int + arguments: + - type: sigset_t * + - name: sigprocmask + standards: + - POSIX + return_type: int + arguments: + - type: int + - type: const sigset_t * __restrict + - type: sigset_t * __restrict + - name: sigfillset + standards: + - POSIX + return_type: int + arguments: + - type: sigset_t * + - name: signal + standards: + - stdc + return_type: __sighandler_t + arguments: + - type: int + - type: __sighandler_t diff --git a/libc/newhdrgen/yaml_combined/stdfix.yaml b/libc/newhdrgen/yaml_combined/stdfix.yaml new file mode 100644 index 0000000..564826a --- /dev/null +++ b/libc/newhdrgen/yaml_combined/stdfix.yaml @@ -0,0 +1,222 @@ +header: stdfix.h +macros: [] +types: [] +enums: [] +objects: [] +functions: + - name: abshk + standards: + - stdc_ext + return_type: short accum + arguments: + - type: short accum + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: abshr + standards: + - stdc_ext + return_type: short fract + arguments: + - type: short fract + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: absk + standards: + - stdc_ext + return_type: accum + arguments: + - type: accum + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: absr + standards: + - stdc_ext + return_type: fract + arguments: + - type: fract + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: abslk + standards: + - stdc_ext + return_type: long accum + arguments: + - type: long accum + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: abslr + standards: + - stdc_ext + return_type: long fract + arguments: + - type: long fract + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: exphk + standards: + - stdc_ext + - llvm_libc_stdfix_ext + return_type: short accum + arguments: + - type: short accum + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: expk + standards: + - stdc_ext + - llvm_libc_stdfix_ext + return_type: accum + arguments: + - type: accum + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: roundhk + standards: + - stdc_ext + return_type: short accum + arguments: + - type: short accum + - type: int + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: roundhr + standards: + - stdc_ext + return_type: short fract + arguments: + - type: short fract + - type: int + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: roundk + standards: + - stdc_ext + return_type: accum + arguments: + - type: accum + - type: int + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: roundr + standards: + - stdc_ext + return_type: fract + arguments: + - type: fract + - type: int + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: roundlk + standards: + - stdc_ext + return_type: long accum + arguments: + - type: long accum + - type: int + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: roundlr + standards: + - stdc_ext + return_type: long fract + arguments: + - type: long fract + - type: int + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: rounduhk + standards: + - stdc_ext + return_type: unsigned short accum + arguments: + - type: unsigned short accum + - type: int + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: rounduhr + standards: + - stdc_ext + return_type: unsigned short fract + arguments: + - type: unsigned short fract + - type: int + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: rounduk + standards: + - stdc_ext + return_type: unsigned accum + arguments: + - type: unsigned accum + - type: int + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: roundur + standards: + - stdc_ext + return_type: unsigned fract + arguments: + - type: unsigned fract + - type: int + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: roundulk + standards: + - stdc_ext + return_type: unsigned long accum + arguments: + - type: unsigned long accum + - type: int + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: roundulr + standards: + - stdc_ext + return_type: unsigned long fract + arguments: + - type: unsigned long fract + - type: int + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: sqrtuhk + standards: + - stdc_ext + - llvm_libc_stdfix_ext + return_type: unsigned short accum + arguments: + - type: unsigned short accum + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: sqrtuhr + standards: + - stdc_ext + - llvm_libc_stdfix_ext + return_type: unsigned short fract + arguments: + - type: unsigned short fract + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: sqrtuk + standards: + - stdc_ext + - llvm_libc_stdfix_ext + return_type: unsigned accum + arguments: + - type: unsigned accum + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: sqrtur + standards: + - stdc_ext + - llvm_libc_stdfix_ext + return_type: unsigned fract + arguments: + - type: unsigned fract + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: sqrtulr + standards: + - stdc_ext + - llvm_libc_stdfix_ext + return_type: unsigned long fract + arguments: + - type: unsigned long fract + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: sqrtulk + standards: llvm_libc_stdfix_ext + return_type: unsigned long accum + arguments: + - type: unsigned long accum + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: uhksqrtus + standards: + - stdc_ext + - llvm_libc_stdfix_ext + return_type: unsigned short accum + arguments: + - type: unsigned short + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: uksqrtui + standards: + - stdc_ext + - llvm_libc_stdfix_ext + return_type: unsigned accum + arguments: + - type: unsigned int + guard: LIBC_COMPILER_HAS_FIXED_POINT diff --git a/libc/newhdrgen/yaml_combined/stdio.yaml b/libc/newhdrgen/yaml_combined/stdio.yaml new file mode 100644 index 0000000..928a8d5 --- /dev/null +++ b/libc/newhdrgen/yaml_combined/stdio.yaml @@ -0,0 +1,370 @@ +header: stdio.h +macros: + - macro_name: _IONBF + macro_value: 2 + - macro_name: _IOLBF + macro_value: 1 + - macro_name: _IOFBF + macro_value: 0 + - macro_name: stdout + macro_value: stdout + - macro_name: stdin + macro_value: stdin +types: + - type_name: size_t + - type_name: off_t + - type_name: cookie_io_functions_t + - type_name: FILE +enums: [] +objects: + - object_name: stdin + object_type: FILE * + - object_name: stdout + object_type: FILE * + - object_name: stderr + object_type: FILE * +functions: + - name: remove + standards: + - stdc + return_type: int + arguments: + - type: const char * + - name: rename + standards: + - stdc + return_type: int + arguments: + - type: const char * + - type: const char * + - name: sprintf + standards: + - stdc + return_type: int + arguments: + - type: char * __restrict + - type: const char * __restrict + - type: ... + - name: snprintf + standards: + - stdc + return_type: int + arguments: + - type: char * __restrict + - type: size_t + - type: const char * __restrict + - type: ... + - name: fprintf + standards: + - stdc + return_type: int + arguments: + - type: FILE * __restrict + - type: const char * __restrict + - type: ... + - name: printf + standards: + - stdc + return_type: int + arguments: + - type: const char * __restrict + - type: ... + - name: vsprintf + standards: + - stdc + return_type: int + arguments: + - type: char * __restrict + - type: const char * __restrict + - type: va_list + - name: vsnprintf + standards: + - stdc + return_type: int + arguments: + - type: char * __restrict + - type: size_t + - type: const char * __restrict + - type: va_list + - name: vfprintf + standards: + - stdc + return_type: int + arguments: + - type: FILE * __restrict + - type: const char * __restrict + - type: va_list + - name: vprintf + standards: + - stdc + return_type: int + arguments: + - type: const char * __restrict + - type: va_list + - name: sscanf + standards: + - stdc + return_type: int + arguments: + - type: const char * __restrict + - type: const char * __restrict + - type: ... + - name: scanf + standards: + - stdc + return_type: int + arguments: + - type: const char * __restrict + - type: ... + - name: fscanf + standards: + - stdc + return_type: int + arguments: + - type: FILE * __restrict + - type: const char * __restrict + - type: ... + - name: fileno + standards: + - POSIX + return_type: int + arguments: + - type: FILE * + - name: clearerr + standards: + - stdc + return_type: void + arguments: + - type: FILE * + - name: clearerr_unlocked + standards: + - GNUExtensions + return_type: void + arguments: + - type: FILE * + - name: fclose + standards: + - stdc + return_type: int + arguments: + - type: FILE * + - name: flockfile + standards: + - POSIX + return_type: void + arguments: + - type: FILE * + - name: feof + standards: + - stdc + return_type: int + arguments: + - type: FILE * + - name: feof_unlocked + standards: + - GNUExtensions + return_type: int + arguments: + - type: FILE * + - name: ferror + standards: + - stdc + return_type: int + arguments: + - type: FILE * + - name: ferror_unlocked + standards: + - GNUExtensions + return_type: int + arguments: + - type: FILE * + - name: fgetc + standards: + - stdc + return_type: int + arguments: + - type: FILE * + - name: fgetc_unlocked + standards: + - GNUExtensions + return_type: int + arguments: + - type: FILE * + - name: fgets + standards: + - stdc + return_type: char * + arguments: + - type: char * __restrict + - type: int + - type: FILE * __restrict + - name: fflush + standards: + - stdc + return_type: int + arguments: + - type: FILE * + - name: fopen + standards: + - stdc + return_type: FILE * + arguments: + - type: const char * + - type: const char * + - name: fputc + standards: + - stdc + return_type: int + arguments: + - type: int + - type: FILE * + - name: fputs + standards: + - stdc + return_type: int + arguments: + - type: const char * __restrict + - type: FILE * __restrict + - name: fopencookie + standards: + - GNUExtensions + return_type: FILE * + arguments: + - type: void * + - type: const char * + - type: cookie_io_functions_t + - name: fread + standards: + - stdc + return_type: size_t + arguments: + - type: void * __restrict + - type: size_t + - type: size_t + - type: FILE * __restrict + - name: fread_unlocked + standards: + - GNUExtensions + return_type: size_t + arguments: + - type: void * __restrict + - type: size_t + - type: size_t + - type: FILE * __restrict + - name: fseek + standards: + - stdc + return_type: int + arguments: + - type: FILE * + - type: long + - type: int + - name: ftell + standards: + - stdc + return_type: long + arguments: + - type: FILE * + - name: funlockfile + standards: + - POSIX + return_type: void + arguments: + - type: FILE * + - name: fwrite + standards: + - stdc + return_type: size_t + arguments: + - type: const void * __restrict + - type: size_t + - type: size_t + - type: FILE * __restrict + - name: fwrite_unlocked + standards: + - GNUExtensions + return_type: size_t + arguments: + - type: const void * __restrict + - type: size_t + - type: size_t + - type: FILE * __restrict + - name: getc + standards: + - stdc + return_type: int + arguments: + - type: FILE * + - name: getc_unlocked + standards: + - POSIX + return_type: int + arguments: + - type: FILE * + - name: getchar + standards: + - stdc + return_type: int + arguments: [] + - name: getchar_unlocked + standards: + - POSIX + return_type: int + arguments: [] + - name: putc + standards: + - stdc + return_type: int + arguments: + - type: int + - type: FILE * + - name: putchar + standards: + - stdc + return_type: int + arguments: + - type: int + - name: puts + standards: + - stdc + return_type: int + arguments: + - type: const char * + - name: setbuf + standards: + - stdc + return_type: void + arguments: + - type: FILE * __restrict + - type: char * __restrict + - name: setvbuf + standards: + - stdc + return_type: int + arguments: + - type: FILE * __restrict + - type: char * __restrict + - type: int + - type: size_t + - name: ungetc + standards: + - stdc + return_type: int + arguments: + - type: int + - type: FILE * + - name: stderr + standards: + - stdc + return_type: extern FILE * + arguments: [] + - name: stdin + standards: + - stdc + return_type: extern FILE * + arguments: [] + - name: stdout + standards: + - stdc + return_type: extern FILE * + arguments: [] diff --git a/libc/newhdrgen/yaml_combined/stdlib.yaml b/libc/newhdrgen/yaml_combined/stdlib.yaml new file mode 100644 index 0000000..032b47f --- /dev/null +++ b/libc/newhdrgen/yaml_combined/stdlib.yaml @@ -0,0 +1,273 @@ +header: stdlib.h +standards: + - stdc +macros: [] +types: + - type_name: __atexithandler_t + - type_name: __qsortrcompare_t + - type_name: __qsortcompare_t + - type_name: __bsearchcompare_t + - type_name: size_t + - type_name: lldiv_t + - type_name: ldiv_t + - type_name: div_t +enums: [] +objects: [] +functions: + - name: abs + standards: + - stdc + return_type: int + arguments: + - type: int + - name: atoi + standards: + - stdc + return_type: int + arguments: + - type: const char * + - name: atof + standards: + - stdc + return_type: double + arguments: + - type: const char * __restrict + - name: atol + standards: + - stdc + return_type: long + arguments: + - type: const char * + - name: atoll + standards: + - stdc + return_type: long long + arguments: + - type: const char * + - name: bsearch + standards: + - stdc + return_type: void * + arguments: + - type: const void * + - type: const void * + - type: size_t + - type: size_t + - type: __bsearchcompare_t + - name: div + standards: + - stdc + return_type: div_t + arguments: + - type: int + - type: int + - name: labs + standards: + - stdc + return_type: long + arguments: + - type: long + - name: ldiv + standards: + - stdc + return_type: ldiv_t + arguments: + - type: long + - type: long + - name: llabs + standards: + - stdc + return_type: long long + arguments: + - type: long long + - name: lldiv + standards: + - stdc + return_type: lldiv_t + arguments: + - type: long long + - type: long long + - name: qsort + standards: + - stdc + return_type: void + arguments: + - type: void * + - type: size_t + - type: size_t + - type: __qsortcompare_t + - name: qsort_r + standards: + - GNUExtensions + return_type: void + arguments: + - type: void * + - type: size_t + - type: size_t + - type: __qsortrcompare_t + - type: void * + - name: rand + standards: + - stdc + return_type: int + arguments: [] + - name: srand + standards: + - stdc + return_type: void + arguments: + - type: unsigned int + - name: strfromd + standards: + - stdc + return_type: int + arguments: + - type: char * __restrict + - type: size_t + - type: const char * __restrict + - type: double + - name: strfromf + standards: + - stdc + return_type: int + arguments: + - type: char * __restrict + - type: size_t + - type: const char * __restrict + - type: float + - name: strfroml + standards: + - stdc + return_type: int + arguments: + - type: char * __restrict + - type: size_t + - type: const char * __restrict + - type: long double + - name: strtod + standards: + - stdc + return_type: double + arguments: + - type: const char * __restrict + - type: char * * __restrict + - name: strtof + standards: + - stdc + return_type: float + arguments: + - type: const char * __restrict + - type: char * * __restrict + - name: strtol + standards: + - stdc + return_type: long + arguments: + - type: const char * __restrict + - type: char * * __restrict + - type: int + - name: strtold + standards: + - stdc + return_type: long double + arguments: + - type: const char * __restrict + - type: char * * __restrict + - name: strtoll + standards: + - stdc + return_type: long long + arguments: + - type: const char * __restrict + - type: char * * __restrict + - type: int + - name: strtoul + standards: + - stdc + return_type: unsigned long + arguments: + - type: const char * __restrict + - type: char * * __restrict + - type: int + - name: strtoull + standards: + - stdc + return_type: unsigned long long + arguments: + - type: const char * __restrict + - type: char * * __restrict + - type: int + - name: malloc + standards: + - stdc + return_type: void * + arguments: + - type: size_t + - name: calloc + standards: + - stdc + return_type: void * + arguments: + - type: size_t + - type: size_t + - name: realloc + standards: + - stdc + return_type: void * + arguments: + - type: void * + - type: size_t + - name: aligned_alloc + standards: + - stdc + return_type: void * + arguments: + - type: size_t + - type: size_t + - name: free + standards: + - stdc + return_type: void + arguments: + - type: void * + - name: _Exit + standards: + - stdc + return_type: _Noreturn void + arguments: + - type: int + - name: abort + standards: + - stdc + return_type: _Noreturn void + arguments: [] + - name: at_quick_exit + standards: + - stdc + return_type: int + arguments: + - type: __atexithandler_t + - name: atexit + standards: + - stdc + return_type: int + arguments: + - type: __atexithandler_t + - name: exit + standards: + - stdc + return_type: _Noreturn void + arguments: + - type: int + - name: getenv + standards: + - stdc + return_type: char * + arguments: + - type: const char * + - name: quick_exit + standards: + - stdc + return_type: _Noreturn void + arguments: + - type: int diff --git a/libc/newhdrgen/yaml_combined/string.yaml b/libc/newhdrgen/yaml_combined/string.yaml new file mode 100644 index 0000000..7080a9b --- /dev/null +++ b/libc/newhdrgen/yaml_combined/string.yaml @@ -0,0 +1,302 @@ +header: string.h +macros: [] +types: + - type_name: size_t +enums: [] +objects: [] +functions: + - name: memcpy + standards: + - stdc + return_type: void * + arguments: + - type: void *__restrict + - type: const void *__restrict + - type: size_t + - name: memmove + standards: + - stdc + return_type: void * + arguments: + - type: void * + - type: const void * + - type: size_t + - name: memcmp + standards: + - stdc + return_type: int + arguments: + - type: const void * + - type: const void * + - type: size_t + - name: memchr + standards: + - stdc + return_type: void * + arguments: + - type: const void * + - type: int + - type: size_t + - name: memset + standards: + - stdc + return_type: void * + arguments: + - type: void * + - type: int + - type: size_t + - name: memset_explicit + standards: + - stdc + return_type: void * + arguments: + - type: void * + - type: int + - type: size_t + - name: strcpy + standards: + - stdc + return_type: char + arguments: + - type: char *__restrict + - type: const char *__restrict + - name: strncpy + standards: + - stdc + return_type: char * + arguments: + - type: char *__restrict + - type: const char *__restrict + - type: size_t + - name: strcat + standards: + - stdc + return_type: char * + arguments: + - type: char *__restrict + - type: const char *__restrict + - name: strncat + standards: + - stdc + return_type: char * + arguments: + - type: char * + - type: const char * + - type: size_t + - name: strcmp + standards: + - stdc + return_type: int + arguments: + - type: const char * + - type: const char * + - name: strcoll + standards: + - stdc + return_type: int + arguments: + - type: const char * + - type: const char * + - name: strncmp + standards: + - stdc + return_type: int + arguments: + - type: const char * + - type: const char * + - type: size_t + - name: strxfrm + standards: + - stdc + return_type: size_t + arguments: + - type: char *__restrict + - type: const char *__restrict + - type: size_t + - name: strchr + standards: + - stdc + return_type: char * + arguments: + - type: const char * + - type: int + - name: strcspn + standards: + - stdc + return_type: size_t + arguments: + - type: const char * + - type: const char * + - name: strdup + return_type: char * + arguments: + - type: const char * + - name: strndup + standards: + - stdc + return_type: char * + arguments: + - type: const char * + - type: size_t + - name: strpbrk + standards: + - stdc + return_type: char * + arguments: + - type: const char * + - type: const char * + - name: strrchr + standards: + - stdc + return_type: char * + arguments: + - type: const char * + - type: int + - name: strspn + standards: + - stdc + return_type: size_t + arguments: + - type: const char * + - type: const char * + - name: strstr + standards: + - stdc + return_type: char * + arguments: + - type: const char * + - type: const char * + - name: strtok + standards: + - stdc + return_type: char * + arguments: + - type: char *__restrict + - type: const char *__restrict + - name: strerror + standards: + - stdc + return_type: char * + arguments: + - type: int + - name: strlen + standards: + - stdc + return_type: size_t + arguments: + - type: const char * + - name: memccpy + standards: + - POSIX + return_type: void * + arguments: + - type: void *__restrict + - type: const void *__restrict + - type: int + - type: size_t + - name: mempcpy + standards: + - POSIX + return_type: void * + arguments: + - type: void *__restrict + - type: const void *__restrict + - type: size_t + - name: stpcpy + standards: + - POSIX + return_type: char * + arguments: + - type: char *__restrict + - type: const char *__restrict + - name: stpncpy + standards: + - POSIX + return_type: char * + arguments: + - type: char *__restrict + - type: const char *__restrict + - type: size_t + - name: strnlen + standards: + - POSIX + return_type: size_t + arguments: + - type: const char * + - type: size_t + - name: strtok_r + standards: + - POSIX + return_type: char * + arguments: + - type: char *__restrict + - type: const char *__restrict + - type: char ** __restrict + - name: strsignal + standards: + - POSIX + return_type: char * + arguments: + - type: int + - name: memmem + standards: + - GNUExtensions + return_type: void * + arguments: + - type: const void * + - type: size_t + - type: const void * + - type: size_t + - name: memrchr + standards: + - GNUExtensions + return_type: void * + arguments: + - type: const void * + - type: int + - type: size_t + - name: strerror_r + standards: + - GNUExtensions + return_type: char * + arguments: + - type: int + - type: char * + - type: size_t + - name: strcasestr + standards: + - GNUExtensions + return_type: char * + arguments: + - type: const char * + - type: const char * + - name: strchrnul + standards: + - GNUExtensions + return_type: char * + arguments: + - type: const char * + - type: int + - name: strlcat + standards: + - BSDExtensions + return_type: size_t + arguments: + - type: char *__restrict + - type: char *__restrict + - type: size_t + - name: strlcpy + standards: + - BSDExtensions + return_type: size_t + arguments: + - type: char *__restrict + - type: char *__restrict + - type: size_t + - name: strsep + standards: + - BSDExtensions + return_type: char * + arguments: + - type: char **__restrict + - type: char *__restrict diff --git a/libc/newhdrgen/yaml_combined/strings.yaml b/libc/newhdrgen/yaml_combined/strings.yaml new file mode 100644 index 0000000..3bc0c4a --- /dev/null +++ b/libc/newhdrgen/yaml_combined/strings.yaml @@ -0,0 +1,58 @@ +header: strings.h +macros: [] +types: [] +enums: [] +objects: [] +functions: + - name: bcopy + standards: + - llvm_libc_ext + return_type: void + arguments: + - type: const void * + - type: void * + - type: size_t + - name: bzero + standards: + - llvm_libc_ext + return_type: void + arguments: + - type: void * + - type: size_t + - name: bcmp + standards: + - llvm_libc_ext + return_type: int + arguments: + - type: const void * + - type: const void * + - type: size_t + - name: strcasecmp + standards: + - BSDExtensions + return_type: int + arguments: + - type: const char * + - type: const char * + - name: strncasecmp + standards: + - BSDExtensions + return_type: int + arguments: + - type: const char * + - type: const char * + - type: size_t + - name: index + standards: + - BSDExtensions + return_type: char * + arguments: + - type: const char * + - type: int + - name: rindex + standards: + - BSDExtensions + return_type: char * + arguments: + - type: const char * + - type: int diff --git a/libc/newhdrgen/yaml_combined/sys_mman.yaml b/libc/newhdrgen/yaml_combined/sys_mman.yaml new file mode 100644 index 0000000..7b858db --- /dev/null +++ b/libc/newhdrgen/yaml_combined/sys_mman.yaml @@ -0,0 +1,118 @@ +#known as sys/mman in POSIX +header: sys-mman.h +standards: POSIX +macros: [] +macros: [] +types: + - type_name: mode_t + - type_name: size_t + - type_name: off_t +enums: [] +objects: [] +functions: + - name: madvise + standards: + - POSIX + return_type: int + arguments: + - type: void * + - type: size_t + - type: int + - name: mmap + standards: + - POSIX + return_type: void * + arguments: + - type: void * + - type: size_t + - type: int + - type: int + - type: int + - type: off_t + - name: mprotect + standards: + - POSIX + return_type: int + arguments: + - type: void * + - type: size_t + - type: int + - name: munmap + standards: + - POSIX + return_type: int + arguments: + - type: void * + - type: size_t + - name: POSIX_madvise + standards: + - POSIX + return_type: int + arguments: + - type: void * + - type: size_t + - type: int + # this is a linux function + - name: mincore + standards: + - Linux + return_type: int + arguments: + - type: void * + - type: size_t + - type: unsigned char * + - name: mlock + standards: + - POSIX + return_type: int + arguments: + - type: void * + - type: size_t + - name: mlock2 + standards: + - Linux + return_type: int + arguments: + - type: void * + - type: size_t + - type: unsigned int + - name: munlock + standards: POSIX + return_type: int + arguments: + - type: void * + - type: size_t + - name: mlockall + standards: + -POSIX + return_type: int + arguments: + - type: int + - name: munlockall + standards: + - POSIX + return_type: int + arguments: [] + - name: msync + standards: + - POSIX + return_type: int + arguments: + - type: void * + - type: size_t + - type: int + - name: shm_open + standards: + - POSIX + return_type: int + arguments: + - type: const char * + - type: int + - type: mode_t + - name: shm_unlink + standards: + - POSIX + return_type: int + arguments: + - type: const char * +
\ No newline at end of file diff --git a/libc/newhdrgen/yaml_combined/sys_wait.yaml b/libc/newhdrgen/yaml_combined/sys_wait.yaml new file mode 100644 index 0000000..56a6066 --- /dev/null +++ b/libc/newhdrgen/yaml_combined/sys_wait.yaml @@ -0,0 +1,33 @@ +header: sys-wait.h #sys/wait.h +macros: [] +types: + - type_name: siginfo_t + - type_name: struct_rusage + - type_name: pid_t +enums: [] +objects: [] +functions: + - name: wait + standards: + - POSIX + return_type: pid_t + arguments: + - type: int * + - name: wait4 + standards: + - BSDExtensions + - POSIX + return_type: pid_t + arguments: + - type: pid_t + - type: int * + - type: int + - type: struct rusage * + - name: waitpid + standards: + - POSIX + return_type: pid_t + arguments: + - type: pid_t + - type: int * + - type: int diff --git a/libc/newhdrgen/yaml_combined/time.yaml b/libc/newhdrgen/yaml_combined/time.yaml new file mode 100644 index 0000000..fbdf187 --- /dev/null +++ b/libc/newhdrgen/yaml_combined/time.yaml @@ -0,0 +1,83 @@ +header: time.h +macros: [] +types: + - type_name: struct_timeval + - type_name: clockid_t + - type_name: struct_timespec + - type_name: struct_tm + - type_name: time_t + - type_name: clock_t +enums: [] +objects: [] +functions: + - name: asctime + standard: + - stdc + return_type: char * + arguments: + - type: struct tm * + - name: asctime_r + standard: + - stdc + return_type: char * + arguments: + - type: struct tm * + - type: char * + - name: clock_gettime + standard: + - POSIX + return_type: int + arguments: + - type: clockid_t + - type: struct timespec * + - name: clock + standard: + - stdc + return_type: clock_t + arguments: [] + - name: difftime + standard: + - stdc + return_type: double + arguments: + - type: time_t + - type: time_t + - name: gettimeofday + standard: + - POSIX + return_type: int + arguments: + - type: struct timeval * + - type: void * + - name: gmtime + standard: + - stdc + return_type: struct tm * + arguments: + - type: time_t * + - name: gmtime_r + standard: + - stdc + return_type: struct tm * + arguments: + - type: time_t * + - type: struct tm * + - name: mktime + standard: + - stdc + return_type: time_t + arguments: + - type: struct tm * + - name: nanosleep + standard: + - POSIX + return_type: int + arguments: + - type: const struct timespec * + - type: struct timespec * + - name: time + standard: + - stdc + return_type: time_t + arguments: + - type: time_t * diff --git a/libc/newhdrgen/yaml_to_classes.py b/libc/newhdrgen/yaml_to_classes.py index 1ac4484..7159dd9 100644 --- a/libc/newhdrgen/yaml_to_classes.py +++ b/libc/newhdrgen/yaml_to_classes.py @@ -47,23 +47,27 @@ def yaml_to_classes(yaml_data): Enumeration(enum_data["name"], enum_data.get("value", None)) ) - for object_data in yaml_data.get("objects", []): - header.add_object( - Object(object_data["object_name"], object_data["object_type"]) - ) - for function_data in yaml_data.get("functions", []): arguments = [arg["type"] for arg in function_data["arguments"]] + guard = function_data.get("guard", None) + attributes = function_data.get("attributes", None) + standards = (function_data.get("standards", None),) header.add_function( Function( + standards, function_data["return_type"], function_data["name"], arguments, - function_data.get("guard"), - function_data.get("attributes", []), + guard, + attributes, ) ) + for object_data in yaml_data.get("objects", []): + header.add_object( + Object(object_data["object_name"], object_data["object_type"]) + ) + for include_data in yaml_data.get("includes", []): header.add_include(Include(include_data)) |