diff options
| author | Michael Kruse <llvm-project@meinersbur.de> | 2025-01-03 10:22:51 +0100 |
|---|---|---|
| committer | Michael Kruse <llvm-project@meinersbur.de> | 2025-01-03 10:22:51 +0100 |
| commit | 38500d63e14ce340236840f60d356cdefb56a52c (patch) | |
| tree | 17edbec446ce9b50d2f215a483b83afb293a635d /libc/include | |
| parent | 1a3d5daaef7a6a63448a497da3eff7fc9e23df26 (diff) | |
| parent | 27f30029741ecf023baece7b3dde1ff9011ffefc (diff) | |
Merge branch 'main' into users/meinersbur/flang_runtime_split-headersusers/meinersbur/flang_runtime_split-headers
Diffstat (limited to 'libc/include')
65 files changed, 7424 insertions, 127 deletions
diff --git a/libc/include/CMakeLists.txt b/libc/include/CMakeLists.txt index 6fdaa6c03c0c..eb407183c99f 100644 --- a/libc/include/CMakeLists.txt +++ b/libc/include/CMakeLists.txt @@ -32,7 +32,7 @@ endmacro() add_header_macro( ctype - ../libc/hdrgen/yaml/ctype.yaml + ../libc/include/ctype.yaml ctype.h.def ctype.h DEPENDS @@ -42,7 +42,7 @@ add_header_macro( add_header_macro( dirent - ../libc/hdrgen/yaml/dirent.yaml + ../libc/include/dirent.yaml dirent.h.def dirent.h DEPENDS @@ -54,7 +54,7 @@ add_header_macro( add_header_macro( fcntl - ../libc/hdrgen/yaml/fcntl.yaml + ../libc/include/fcntl.yaml fcntl.h.def fcntl.h DEPENDS @@ -70,7 +70,7 @@ add_header_macro( add_header_macro( dlfcn - ../libc/hdrgen/yaml/dlfcn.yaml + ../libc/include/dlfcn.yaml dlfcn.h.def dlfcn.h DEPENDS @@ -80,7 +80,7 @@ add_header_macro( add_header_macro( features - ../libc/hdrgen/yaml/features.yaml + ../libc/include/features.yaml features.h.def features.h DEPENDS @@ -90,7 +90,7 @@ add_header_macro( add_header_macro( fenv - ../libc/hdrgen/yaml/fenv.yaml + ../libc/include/fenv.yaml fenv.h.def fenv.h DEPENDS @@ -102,7 +102,7 @@ add_header_macro( add_header_macro( inttypes - ../libc/hdrgen/yaml/inttypes.yaml + ../libc/include/inttypes.yaml inttypes.h.def inttypes.h DEPENDS @@ -113,7 +113,7 @@ add_header_macro( add_header_macro( float - ../libc/hdrgen/yaml/float.yaml + ../libc/include/float.yaml float.h.def float.h DEPENDS @@ -122,7 +122,7 @@ add_header_macro( add_header_macro( stdint - ../libc/hdrgen/yaml/stdint.yaml + ../libc/include/stdint.yaml stdint.h.def stdint.h DEPENDS @@ -131,7 +131,7 @@ add_header_macro( add_header_macro( limits - ../libc/hdrgen/yaml/limits.yaml + ../libc/include/limits.yaml limits.h.def limits.h DEPENDS @@ -140,7 +140,7 @@ add_header_macro( add_header_macro( malloc - ../libc/hdrgen/yaml/malloc.yaml + ../libc/include/malloc.yaml malloc.h.def malloc.h DEPENDS @@ -150,7 +150,7 @@ add_header_macro( add_header_macro( math - ../libc/hdrgen/yaml/math.yaml + ../libc/include/math.yaml math.h.def math.h DEPENDS @@ -165,7 +165,7 @@ add_header_macro( add_header_macro( stdfix - ../libc/hdrgen/yaml/stdfix.yaml + ../libc/include/stdfix.yaml stdfix.h.def stdfix.h DEPENDS @@ -178,7 +178,7 @@ file(MAKE_DIRECTORY ${LIBC_INCLUDE_DIR}/arpa) add_header_macro( arpa_inet - ../libc/hdrgen/yaml/arpa/inet.yaml + ../libc/include/arpa/inet.yaml arpa/inet.h.def arpa/inet.h DEPENDS @@ -187,7 +187,7 @@ add_header_macro( add_header_macro( assert - ../libc/hdrgen/yaml/assert.yaml + ../libc/include/assert.yaml assert.h.def assert.h DEPENDS @@ -197,7 +197,7 @@ add_header_macro( add_header_macro( complex - ../libc/hdrgen/yaml/complex.yaml + ../libc/include/complex.yaml complex.h.def complex.h DEPENDS @@ -207,7 +207,7 @@ add_header_macro( add_header_macro( setjmp - ../libc/hdrgen/yaml/setjmp.yaml + ../libc/include/setjmp.yaml setjmp.h.def setjmp.h DEPENDS @@ -217,7 +217,7 @@ add_header_macro( add_header_macro( string - ../libc/hdrgen/yaml/string.yaml + ../libc/include/string.yaml string.h.def string.h DEPENDS @@ -228,7 +228,7 @@ add_header_macro( add_header_macro( strings - ../libc/hdrgen/yaml/strings.yaml + ../libc/include/strings.yaml strings.h.def strings.h DEPENDS @@ -238,7 +238,7 @@ add_header_macro( add_header_macro( search - ../libc/hdrgen/yaml/search.yaml + ../libc/include/search.yaml search.h.def search.h DEPENDS @@ -252,7 +252,7 @@ add_header_macro( add_header_macro( time - ../libc/hdrgen/yaml/time.yaml + ../libc/include/time.yaml time.h.def time.h DEPENDS @@ -268,7 +268,7 @@ add_header_macro( add_header_macro( threads - ../libc/hdrgen/yaml/threads.yaml + ../libc/include/threads.yaml threads.h.def threads.h DEPENDS @@ -285,7 +285,7 @@ add_header_macro( add_header_macro( errno - ../libc/hdrgen/yaml/errno.yaml + ../libc/include/errno.yaml errno.h.def errno.h DEPENDS @@ -295,7 +295,7 @@ add_header_macro( add_header_macro( signal - ../libc/hdrgen/yaml/signal.yaml + ../libc/include/signal.yaml signal.h.def signal.h DEPENDS @@ -311,7 +311,7 @@ add_header_macro( add_header_macro( stdbit - ../libc/hdrgen/yaml/stdbit.yaml + ../libc/include/stdbit.yaml stdbit.h.def stdbit.h DEPENDS @@ -321,7 +321,7 @@ add_header_macro( add_header_macro( stdckdint - ../libc/hdrgen/yaml/stdckdint.yaml + ../libc/include/stdckdint.yaml stdckdint.h.def stdckdint.h DEPENDS @@ -331,7 +331,7 @@ add_header_macro( add_header_macro( stdio - ../libc/hdrgen/yaml/stdio.yaml + ../libc/include/stdio.yaml stdio.h.def stdio.h DEPENDS @@ -347,7 +347,7 @@ add_header_macro( add_header_macro( stdlib - ../libc/hdrgen/yaml/stdlib.yaml + ../libc/include/stdlib.yaml stdlib.h.def stdlib.h DEPENDS @@ -366,7 +366,7 @@ add_header_macro( add_header_macro( unistd - ../libc/hdrgen/yaml/unistd.yaml + ../libc/include/unistd.yaml unistd.h.def unistd.h DEPENDS @@ -385,11 +385,11 @@ add_header_macro( add_header_macro( pthread - ../libc/hdrgen/yaml/pthread.yaml + ../libc/include/pthread.yaml pthread.h.def pthread.h DEPENDS - .llvm_libc_common_h + .llvm-libc-macros.pthread_macros .llvm-libc-types.__atfork_callback_t .llvm-libc-types.__pthread_once_func_t .llvm-libc-types.__pthread_start_t @@ -404,11 +404,12 @@ add_header_macro( .llvm-libc-types.pthread_rwlockattr_t .llvm-libc-types.pthread_spinlock_t .llvm-libc-types.pthread_t + .llvm_libc_common_h ) add_header_macro( sched - ../libc/hdrgen/yaml/sched.yaml + ../libc/include/sched.yaml sched.h.def sched.h DEPENDS @@ -425,7 +426,7 @@ add_header_macro( add_header_macro( spawn - ../libc/hdrgen/yaml/spawn.yaml + ../libc/include/spawn.yaml spawn.h.def spawn.h DEPENDS @@ -438,7 +439,7 @@ add_header_macro( add_header_macro( link - ../libc/hdrgen/yaml/link.yaml + ../libc/include/link.yaml link.h.def link.h DEPENDS @@ -448,7 +449,7 @@ add_header_macro( add_header_macro( elf - ../libc/hdrgen/yaml/elf.yaml + ../libc/include/elf.yaml elf.h.def elf.h DEPENDS @@ -462,7 +463,7 @@ file(MAKE_DIRECTORY ${LIBC_INCLUDE_DIR}/sys) add_header_macro( sys_auxv - ../libc/hdrgen/yaml/sys/auxv.yaml + ../libc/include/sys/auxv.yaml sys/auxv.h.def sys/auxv.h DEPENDS @@ -472,7 +473,7 @@ add_header_macro( add_header_macro( sys_epoll - ../libc/hdrgen/yaml/sys/epoll.yaml + ../libc/include/sys/epoll.yaml sys/epoll.h.def sys/epoll.h DEPENDS @@ -485,7 +486,7 @@ add_header_macro( add_header_macro( sys_ioctl - ../libc/hdrgen/yaml/sys/ioctl.yaml + ../libc/include/sys/ioctl.yaml sys/ioctl.h.def sys/ioctl.h DEPENDS @@ -495,7 +496,7 @@ add_header_macro( add_header_macro( sys_mman - ../libc/hdrgen/yaml/sys/mman.yaml + ../libc/include/sys/mman.yaml sys/mman.h.def sys/mman.h DEPENDS @@ -508,7 +509,7 @@ add_header_macro( add_header_macro( sys_prctl - ../libc/hdrgen/yaml/sys/prctl.yaml + ../libc/include/sys/prctl.yaml sys/prctl.h.def sys/prctl.h DEPENDS @@ -525,7 +526,7 @@ add_header( add_header_macro( sys_random - ../libc/hdrgen/yaml/sys/random.yaml + ../libc/include/sys/random.yaml sys/random.h.def sys/random.h DEPENDS @@ -537,7 +538,7 @@ add_header_macro( add_header_macro( sys_resource - ../libc/hdrgen/yaml/sys/resource.yaml + ../libc/include/sys/resource.yaml sys/resource.h.def sys/resource.h DEPENDS @@ -549,7 +550,7 @@ add_header_macro( add_header_macro( sys_stat - ../libc/hdrgen/yaml/sys/stat.yaml + ../libc/include/sys/stat.yaml sys/stat.h.def sys/stat.h DEPENDS @@ -571,7 +572,7 @@ add_header_macro( add_header_macro( sys_select - ../libc/hdrgen/yaml/sys/select.yaml + ../libc/include/sys/select.yaml sys/select.h.def sys/select.h DEPENDS @@ -587,7 +588,7 @@ add_header_macro( add_header_macro( sys_sendfile - ../libc/hdrgen/yaml/sys/sendfile.yaml + ../libc/include/sys/sendfile.yaml sys/sendfile.h.def sys/sendfile.h DEPENDS @@ -599,7 +600,7 @@ add_header_macro( add_header_macro( sys_socket - ../libc/hdrgen/yaml/sys/socket.yaml + ../libc/include/sys/socket.yaml sys/socket.h.def sys/socket.h DEPENDS @@ -615,7 +616,7 @@ add_header_macro( add_header_macro( sys_statvfs - ../libc/hdrgen/yaml/sys/statvfs.yaml + ../libc/include/sys/statvfs.yaml sys/statvfs.h.def sys/statvfs.h DEPENDS @@ -625,7 +626,7 @@ add_header_macro( add_header_macro( sys_syscall - ../libc/hdrgen/yaml/sys/syscall.yaml + ../libc/include/sys/syscall.yaml sys/syscall.h.def sys/syscall.h DEPENDS @@ -633,7 +634,7 @@ add_header_macro( add_header_macro( sys_time - ../libc/hdrgen/yaml/sys/time.yaml + ../libc/include/sys/time.yaml sys/time.h.def sys/time.h DEPENDS @@ -644,7 +645,7 @@ add_header_macro( add_header_macro( sys_types - ../libc/hdrgen/yaml/sys/types.yaml + ../libc/include/sys/types.yaml sys/types.h.def sys/types.h DEPENDS @@ -674,7 +675,7 @@ add_header_macro( add_header_macro( sys_utsname - ../libc/hdrgen/yaml/sys/utsname.yaml + ../libc/include/sys/utsname.yaml sys/utsname.h.def sys/utsname.h DEPENDS @@ -684,7 +685,7 @@ add_header_macro( add_header_macro( sys_wait - ../libc/hdrgen/yaml/sys/wait.yaml + ../libc/include/sys/wait.yaml sys/wait.h.def sys/wait.h DEPENDS @@ -697,7 +698,7 @@ add_header_macro( add_header_macro( termios - ../libc/hdrgen/yaml/termios.yaml + ../libc/include/termios.yaml termios.h.def termios.h DEPENDS @@ -712,7 +713,7 @@ add_header_macro( add_header_macro( uchar - ../libc/hdrgen/yaml/uchar.yaml + ../libc/include/uchar.yaml uchar.h.def uchar.h DEPENDS @@ -725,7 +726,7 @@ add_header_macro( add_header_macro( wchar - ../libc/hdrgen/yaml/wchar.yaml + ../libc/include/wchar.yaml wchar.h.def wchar.h DEPENDS @@ -739,7 +740,7 @@ add_header_macro( add_header_macro( locale - ../libc/hdrgen/yaml/locale.yaml + ../libc/include/locale.yaml locale.h.def locale.h DEPENDS @@ -749,19 +750,6 @@ add_header_macro( .llvm-libc-types.struct_lconv ) -if(LIBC_TARGET_OS_IS_GPU) - file(MAKE_DIRECTORY ${LIBC_INCLUDE_DIR}/gpu) - - add_header_macro( - gpu_rpc - ../libc/hdrgen/yaml/gpu/rpc.yaml - gpu/rpc.h.def - gpu/rpc.h - DEPENDS - .llvm_libc_common_h - ) -endif() - if(NOT LLVM_LIBC_FULL_BUILD) # We don't install headers in non-fullbuild mode. return() diff --git a/libc/include/__llvm-libc-common.h b/libc/include/__llvm-libc-common.h index e0e29bbbd5f8..d9d70aff771c 100644 --- a/libc/include/__llvm-libc-common.h +++ b/libc/include/__llvm-libc-common.h @@ -52,8 +52,22 @@ #undef __restrict #define __restrict restrict // C99 and above support the restrict keyword. +#undef _Noreturn +#if __STDC_VERSION__ >= 201112L +// In C11 and later, _Noreturn is a keyword. +#elif defined(__GNUC__) +// GNU-compatible compilers have an equivalent attribute. +#define _Noreturn __attribute__((__noreturn__)) +#else +#define _Noreturn +#endif + #undef __NOEXCEPT +#ifdef __GNUC__ +#define __NOEXCEPT __attribute__((__nothrow__)) +#else #define __NOEXCEPT +#endif #endif // __cplusplus diff --git a/libc/include/arpa/inet.yaml b/libc/include/arpa/inet.yaml new file mode 100644 index 000000000000..cb366e0f5d69 --- /dev/null +++ b/libc/include/arpa/inet.yaml @@ -0,0 +1,30 @@ +header: arpa-inet.h +macros: [] +types: [] +enums: [] +objects: [] +functions: + - name: htonl + standards: + - POSIX + return_type: uint32_t + arguments: + - type: uint32_t + - name: htons + standards: + - POSIX + return_type: uint16_t + arguments: + - type: uint16_t + - name: ntohl + standards: + - POSIX + return_type: uint32_t + arguments: + - type: uint32_t + - name: ntohs + standards: + - POSIX + return_type: uint16_t + arguments: + - type: uint16_t diff --git a/libc/include/assert.yaml b/libc/include/assert.yaml new file mode 100644 index 000000000000..f740554488ed --- /dev/null +++ b/libc/include/assert.yaml @@ -0,0 +1,15 @@ +header: assert.h +macros: [] +types: [] +enums: [] +objects: [] +functions: + - name: __assert_fail + standards: + - llvm_libc_ext + return_type: _Noreturn void + arguments: + - type: const char * + - type: const char * + - type: unsigned + - type: const char * diff --git a/libc/include/complex.yaml b/libc/include/complex.yaml new file mode 100644 index 000000000000..cd81de7dd9e2 --- /dev/null +++ b/libc/include/complex.yaml @@ -0,0 +1,137 @@ +header: complex.h +macros: [] +types: + - type_name: cfloat16 + - type_name: cfloat128 + - type_name: float128 +enums: [] +objects: [] +functions: + - name: cimag + standards: + - stdc + return_type: double + arguments: + - type: _Complex double + - name: cimagf + standards: + - stdc + return_type: float + arguments: + - type: _Complex float + - name: cimagl + standards: + - stdc + return_type: long double + arguments: + - type: _Complex long double + - name: cimagf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: cfloat16 + guard: LIBC_TYPES_HAS_CFLOAT16 + - name: cimagf128 + standards: + - stdc + return_type: float128 + arguments: + - type: cfloat128 + guard: LIBC_TYPES_HAS_CFLOAT128 + - name: creal + standards: + - stdc + return_type: double + arguments: + - type: _Complex double + - name: crealf + standards: + - stdc + return_type: float + arguments: + - type: _Complex float + - name: creall + standards: + - stdc + return_type: long double + arguments: + - type: _Complex long double + - name: crealf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: cfloat16 + guard: LIBC_TYPES_HAS_CFLOAT16 + - name: crealf128 + standards: + - stdc + return_type: float128 + arguments: + - type: cfloat128 + guard: LIBC_TYPES_HAS_CFLOAT128 + - name: conj + standards: + - stdc + return_type: _Complex double + arguments: + - type: _Complex double + - name: conjf + standards: + - stdc + return_type: _Complex float + arguments: + - type: _Complex float + - name: conjl + standards: + - stdc + return_type: _Complex long double + arguments: + - type: _Complex long double + - name: conjf16 + standards: + - stdc + return_type: cfloat16 + arguments: + - type: cfloat16 + guard: LIBC_TYPES_HAS_CFLOAT16 + - name: conjf128 + standards: + - stdc + return_type: cfloat128 + arguments: + - type: cfloat128 + guard: LIBC_TYPES_HAS_CFLOAT128 + - name: cproj + standards: + - stdc + return_type: _Complex double + arguments: + - type: _Complex double + - name: cprojf + standards: + - stdc + return_type: _Complex float + arguments: + - type: _Complex float + - name: cprojl + standards: + - stdc + return_type: _Complex long double + arguments: + - type: _Complex long double + - name: cprojf16 + standards: + - stdc + return_type: cfloat16 + arguments: + - type: cfloat16 + guard: LIBC_TYPES_HAS_CFLOAT16 + - name: cprojf128 + standards: + - stdc + return_type: cfloat128 + arguments: + - type: cfloat128 + guard: LIBC_TYPES_HAS_CFLOAT128 diff --git a/libc/include/ctype.yaml b/libc/include/ctype.yaml new file mode 100644 index 000000000000..b4823c3e5323 --- /dev/null +++ b/libc/include/ctype.yaml @@ -0,0 +1,201 @@ +header: ctype.h +macros: [] +types: + - type_name: locale_t +enums: [] +objects: [] +functions: + - name: isalnum + standards: + - stdc + return_type: int + arguments: + - type: int + - name: isalpha + standards: + - stdc + return_type: int + arguments: + - type: int + - name: isascii + standards: + - POSIX + 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: toascii + standards: + - GNUExtensions + 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 + - name: isalnum_l + standards: + - stdc + return_type: int + arguments: + - type: int + - type: locale_t + - name: isalpha_l + standards: + - stdc + return_type: int + arguments: + - type: int + - type: locale_t + - name: isblank_l + standards: + - stdc + return_type: int + arguments: + - type: int + - type: locale_t + - name: iscntrl_l + standards: + - stdc + return_type: int + arguments: + - type: int + - type: locale_t + - name: isdigit_l + standards: + - stdc + return_type: int + arguments: + - type: int + - type: locale_t + - name: isgraph_l + standards: + - stdc + return_type: int + arguments: + - type: int + - type: locale_t + - name: islower_l + standards: + - stdc + return_type: int + arguments: + - type: int + - type: locale_t + - name: isprint_l + standards: + - stdc + return_type: int + arguments: + - type: int + - type: locale_t + - name: ispunct_l + standards: + - stdc + return_type: int + arguments: + - type: int + - type: locale_t + - name: isspace_l + standards: + - stdc + return_type: int + arguments: + - type: int + - type: locale_t + - name: isupper_l + standards: + - stdc + return_type: int + arguments: + - type: int + - type: locale_t + - name: isxdigit_l + standards: + - stdc + return_type: int + arguments: + - type: int + - type: locale_t + - name: tolower_l + standards: + - stdc + return_type: int + arguments: + - type: int + - type: locale_t + - name: toupper_l + standards: + - stdc + return_type: int + arguments: + - type: int + - type: locale_t diff --git a/libc/include/dirent.yaml b/libc/include/dirent.yaml new file mode 100644 index 000000000000..cdccf6a0c7f2 --- /dev/null +++ b/libc/include/dirent.yaml @@ -0,0 +1,46 @@ +header: dirent.h +macros: [] +types: + - type_name: struct_dirent + - type_name: DIR + - type_name: ino_t +enums: [] +objects: [] +functions: + - name: alphasort + standards: + - POSIX + return_type: int + arguments: + - type: const struct dirent ** + - type: const struct dirent ** + - name: closedir + standards: + - POSIX + return_type: int + arguments: + - type: DIR * + - name: dirfd + standards: + - POSIX + return_type: int + arguments: + - type: DIR * + - name: fdopendir + standards: + - POSIX + return_type: DIR * + arguments: + - type: int + - name: opendir + standards: + - POSIX + return_type: DIR * + arguments: + - type: const char * + - name: readdir + standards: + - POSIX + return_type: struct dirent * + arguments: + - type: DIR * diff --git a/libc/include/dlfcn.yaml b/libc/include/dlfcn.yaml new file mode 100644 index 000000000000..725ee705714a --- /dev/null +++ b/libc/include/dlfcn.yaml @@ -0,0 +1,39 @@ +header: dlfcn.h +macros: + - macro_name: RTLD_LAZY + macro_value: null + - macro_name: RTLD_NOW + macro_value: null + - macro_name: RTLD_GLOBAL + macro_value: null + - macro_name: RTLD_LOCAL + macro_value: null +types: [] +enums: [] +objects: [] +functions: + - name: dlclose + standards: + - POSIX + return_type: int + arguments: + - type: void * + - name: dlerror + standards: + - POSIX + return_type: char * + arguments: [] + - name: dlopen + standards: + - POSIX + return_type: void * + arguments: + - type: const char * + - type: int + - name: dlsym + standards: + - POSIX + return_type: void * + arguments: + - type: void *__restrict + - type: const char *__restrict diff --git a/libc/include/elf.yaml b/libc/include/elf.yaml new file mode 100644 index 000000000000..2e9db329e229 --- /dev/null +++ b/libc/include/elf.yaml @@ -0,0 +1,8 @@ +header: elf.h +standards: + - Linux +macros: [] +types: [] +enums: [] +objects: [] +functions: [] diff --git a/libc/include/errno.yaml b/libc/include/errno.yaml new file mode 100644 index 000000000000..a894063a1ee2 --- /dev/null +++ b/libc/include/errno.yaml @@ -0,0 +1,10 @@ +header: errno.h +standards: + - stdc + - Linux + - POSIX +macros: [] +types: [] +enums: [] +objects: [] +functions: [] diff --git a/libc/include/fcntl.yaml b/libc/include/fcntl.yaml new file mode 100644 index 000000000000..71c0df3b0fad --- /dev/null +++ b/libc/include/fcntl.yaml @@ -0,0 +1,40 @@ +header: fcntl.h +macros: [] +types: + - type_name: off_t + - type_name: mode_t +enums: [] +objects: [] +functions: + - name: creat + standards: + - POSIX + return_type: int + arguments: + - type: const char * + - type: mode_t + - name: fcntl + standards: + - POSIX + return_type: int + arguments: + - type: int + - type: int + - type: '...' + - name: open + standards: + - POSIX + return_type: int + arguments: + - type: const char * + - type: int + - type: '...' + - name: openat + standards: + - POSIX + return_type: int + arguments: + - type: int + - type: const char * + - type: int + - type: '...' diff --git a/libc/include/features.yaml b/libc/include/features.yaml new file mode 100644 index 000000000000..a18af22edb74 --- /dev/null +++ b/libc/include/features.yaml @@ -0,0 +1,8 @@ +header: features.h +standards: + - stdc +macros: [] +types: [] +enums: [] +objects: [] +functions: [] diff --git a/libc/include/fenv.yaml b/libc/include/fenv.yaml new file mode 100644 index 000000000000..1010efc6402c --- /dev/null +++ b/libc/include/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: fedisableexcept + standards: + - GNUExtensions + return_type: int + arguments: + - type: int + guard: null + - name: feenableexcept + standards: + - GNUExtensions + return_type: int + arguments: + - type: int + attributes: [] + - name: fegetenv + standards: + - stdc + return_type: int + arguments: + - type: fenv_t * + - name: fegetexcept + standards: + - GNUExtensions + return_type: int + arguments: [] + - name: fegetexceptflag + standards: + - stdc + return_type: int + arguments: + - type: fexcept_t * + - type: int + - name: fegetround + standards: + - stdc + return_type: int + arguments: [] + - name: feholdexcept + standards: + - stdc + return_type: int + arguments: + - type: fenv_t * + - name: feraiseexcept + standards: + - stdc + return_type: int + arguments: + - type: int + - name: fesetenv + standards: + - stdc + return_type: int + arguments: + - type: const fenv_t * + - 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: fesetround + 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: feupdateenv + standards: + - stdc + return_type: int + arguments: + - type: const fenv_t * diff --git a/libc/include/float.yaml b/libc/include/float.yaml new file mode 100644 index 000000000000..63639a6e8ed1 --- /dev/null +++ b/libc/include/float.yaml @@ -0,0 +1,8 @@ +header: float.h +standards: + - stdc +macros: [] +types: [] +enums: [] +objects: [] +functions: [] diff --git a/libc/include/gpu/rpc.h.def b/libc/include/gpu/rpc.h.def deleted file mode 100644 index 060650345e1f..000000000000 --- a/libc/include/gpu/rpc.h.def +++ /dev/null @@ -1,18 +0,0 @@ -//===-- GPU header rpc.h --------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIBC_GPU_RPC_H -#define LLVM_LIBC_GPU_RPC_H - -#include "__llvm-libc-common.h" - -#include "../llvm-libc-types/rpc_opcodes_t.h" - -%%public_api() - -#endif // LLVM_LIBC_GPU_RPC_H diff --git a/libc/include/inttypes.yaml b/libc/include/inttypes.yaml new file mode 100644 index 000000000000..ad636cc5121a --- /dev/null +++ b/libc/include/inttypes.yaml @@ -0,0 +1,36 @@ +header: inttypes.h +macros: [] +types: + - type_name: imaxdiv_t +enums: [] +objects: [] +functions: + - name: imaxabs + standards: + - stdc + return_type: intmax_t + arguments: + - type: intmax_t + - name: imaxdiv + standards: + - stdc + return_type: imaxdiv_t + arguments: + - type: intmax_t + - type: intmax_t + - name: strtoimax + standards: + - stdc + return_type: intmax_t + arguments: + - type: const char *__restrict + - type: char * *__restrict + - type: int + - name: strtoumax + standards: + - stdc + return_type: uintmax_t + arguments: + - type: const char *__restrict + - type: char * *__restrict + - type: int diff --git a/libc/include/limits.yaml b/libc/include/limits.yaml new file mode 100644 index 000000000000..bf33ed24e7a8 --- /dev/null +++ b/libc/include/limits.yaml @@ -0,0 +1,8 @@ +header: limits.h +standards: + - stdc +macros: [] +types: [] +enums: [] +objects: [] +functions: [] diff --git a/libc/include/link.yaml b/libc/include/link.yaml new file mode 100644 index 000000000000..d1963a86813a --- /dev/null +++ b/libc/include/link.yaml @@ -0,0 +1,8 @@ +header: link.h +standards: + - Linux +macros: [] +types: [] +enums: [] +objects: [] +functions: [] diff --git a/libc/include/llvm-libc-macros/CMakeLists.txt b/libc/include/llvm-libc-macros/CMakeLists.txt index 75194923a452..9d5d9f654428 100644 --- a/libc/include/llvm-libc-macros/CMakeLists.txt +++ b/libc/include/llvm-libc-macros/CMakeLists.txt @@ -315,3 +315,9 @@ add_macro_header( HDR locale-macros.h ) + +add_macro_header( + pthread_macros + HDR + pthread-macros.h +) diff --git a/libc/include/llvm-libc-macros/pthread-macros.h b/libc/include/llvm-libc-macros/pthread-macros.h new file mode 100644 index 000000000000..8a144dbd2e61 --- /dev/null +++ b/libc/include/llvm-libc-macros/pthread-macros.h @@ -0,0 +1,37 @@ +//===-- Definition of pthread macros --------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIBC_MACROS_PTHREAD_MACRO_H +#define LLVM_LIBC_MACROS_PTHREAD_MACRO_H + +#define PTHREAD_CREATE_JOINABLE 0 +#define PTHREAD_CREATE_DETACHED 1 + +#define PTHREAD_MUTEX_NORMAL 0 +#define PTHREAD_MUTEX_ERRORCHECK 1 +#define PTHREAD_MUTEX_RECURSIVE 2 +#define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_NORMAL + +#define PTHREAD_MUTEX_STALLED 0 +#define PTHREAD_MUTEX_ROBUST 1 + +#define PTHREAD_ONCE_INIT {0} + +#define PTHREAD_PROCESS_PRIVATE 0 +#define PTHREAD_PROCESS_SHARED 1 + +#define PTHREAD_MUTEX_INITIALIZER {0} +#define PTHREAD_RWLOCK_INITIALIZER {0} + +// glibc extensions +#define PTHREAD_STACK_MIN (1 << 14) // 16KB +#define PTHREAD_RWLOCK_PREFER_READER_NP 0 +#define PTHREAD_RWLOCK_PREFER_WRITER_NP 1 +#define PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP 2 + +#endif // LLVM_LIBC_MACROS_PTHREAD_MACRO_H diff --git a/libc/include/llvm-libc-macros/windows/CMakeLists.txt b/libc/include/llvm-libc-macros/windows/CMakeLists.txt new file mode 100644 index 000000000000..48afc795178a --- /dev/null +++ b/libc/include/llvm-libc-macros/windows/CMakeLists.txt @@ -0,0 +1,6 @@ +add_header( + time_macros_ext + HDR + time-macros-ext.h +) + diff --git a/libc/include/llvm-libc-macros/windows/time-macros-ext.h b/libc/include/llvm-libc-macros/windows/time-macros-ext.h new file mode 100644 index 000000000000..71d914b45187 --- /dev/null +++ b/libc/include/llvm-libc-macros/windows/time-macros-ext.h @@ -0,0 +1,17 @@ +//===-- Windows Time Macros Extension -------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIBC_MACROS_WINDOWS_TIME_MACROS_EXT_H +#define LLVM_LIBC_MACROS_WINDOWS_TIME_MACROS_EXT_H + +#define CLOCK_MONOTONIC 0 +#define CLOCK_REALTIME 1 +#define CLOCK_PROCESS_CPUTIME_ID 2 +#define CLOCK_THREAD_CPUTIME_ID 3 + +#endif // LLVM_LIBC_MACROS_WINDOWS_TIME_MACROS_EXT_H diff --git a/libc/include/llvm-libc-types/cfloat128.h b/libc/include/llvm-libc-types/cfloat128.h index a371671cf623..f76a0c1c2f5a 100644 --- a/libc/include/llvm-libc-types/cfloat128.h +++ b/libc/include/llvm-libc-types/cfloat128.h @@ -35,6 +35,7 @@ typedef _Complex _Float128 cfloat128; typedef _Complex __float128 cfloat128; #elif (LDBL_MANT_DIG == 113) #define LIBC_TYPES_HAS_CFLOAT128 +#define LIBC_TYPES_CFLOAT128_IS_COMPLEX_LONG_DOUBLE typedef _Complex long double cfloat128; #endif diff --git a/libc/include/locale.yaml b/libc/include/locale.yaml new file mode 100644 index 000000000000..7da7966ea730 --- /dev/null +++ b/libc/include/locale.yaml @@ -0,0 +1,41 @@ +header: locale.h +functions: + - name: localeconv + standards: + - stdc + return_type: struct lconv * + arguments: + - type: void + - name: duplocale + standards: + - stdc + return_type: locale_t + arguments: + - type: locale_t + - name: freelocale + standards: + - stdc + return_type: void + arguments: + - type: locale_t + - name: newlocale + standards: + - stdc + return_type: locale_t + arguments: + - type: int + - type: const char * + - type: locale_t + - name: setlocale + standards: + - stdc + return_type: char * + arguments: + - type: int + - type: const char * + - name: uselocale + standards: + - stdc + return_type: locale_t + arguments: + - type: locale_t diff --git a/libc/include/malloc.yaml b/libc/include/malloc.yaml new file mode 100644 index 000000000000..8db4f3aebb9b --- /dev/null +++ b/libc/include/malloc.yaml @@ -0,0 +1,13 @@ +header: malloc.h +macros: [] +types: [] +enums: [] +objects: [] +functions: + - name: mallopt + standards: + - GNUExtensions + return_type: int + arguments: + - type: int + - type: int diff --git a/libc/include/math.yaml b/libc/include/math.yaml new file mode 100644 index 000000000000..3b8caec66bbf --- /dev/null +++ b/libc/include/math.yaml @@ -0,0 +1,2629 @@ +header: math.h +macros: [] +types: + - type_name: float_t + - type_name: double_t + - type_name: float128 +enums: [] +objects: [] +functions: + - name: acosf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: acoshf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: asin + standards: + - stdc + return_type: double + arguments: + - type: double + - name: asinf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: asinhf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: atan2 + standards: + - stdc + return_type: double + arguments: + - type: double + - type: double + - name: atan2f + standards: + - stdc + return_type: float + arguments: + - type: float + - type: float + - name: atan2l + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - name: atanf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: atanhf + standards: + - stdc + return_type: float + arguments: + - type: float + - 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: canonicalizef128 + standards: + - stdc + return_type: int + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: canonicalizef16 + standards: + - stdc + return_type: int + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: canonicalizel + standards: + - stdc + return_type: int + arguments: + - type: long double + - type: long double + - name: cbrt + standards: + - stdc + return_type: double + arguments: + - type: double + - name: cbrtf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: ceil + standards: + - stdc + return_type: double + arguments: + - type: double + - name: ceilf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: ceilf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: ceilf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: ceill + standards: + - stdc + return_type: long double + arguments: + - type: long double + - 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: copysignf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: copysignf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: copysignl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - name: cos + standards: + - stdc + return_type: double + arguments: + - type: double + - name: cosf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: cosf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: coshf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: cospif16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: coshf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: ddivl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - name: dmulf128 + standards: + - llvm_libc_ext + return_type: double + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: dmull + standards: + - stdc + return_type: double + arguments: + - type: long double + - type: long double + - name: dsqrtl + standards: + - stdc + return_type: double + arguments: + - type: long double + - name: dsqrtf128 + standards: + - llvm_libc_ext + return_type: double + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: erff + standards: + - stdc + return_type: float + arguments: + - type: float + - name: exp + standards: + - stdc + return_type: double + arguments: + - type: double + - name: exp10 + standards: + - stdc + return_type: double + arguments: + - type: double + - name: exp10f + standards: + - stdc + return_type: float + arguments: + - type: float + - name: exp10m1f + standards: + - stdc + return_type: float + arguments: + - type: float + - name: exp10m1f16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - 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: exp2m1f16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: expf + 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: f16add + standards: + - llvm_libc_ext + return_type: _Float16 + arguments: + - type: double + - type: double + guard: LIBC_TYPES_HAS_FLOAT16 + - name: f16addf + standards: + - llvm_libc_ext + return_type: _Float16 + arguments: + - type: float + - type: float + guard: LIBC_TYPES_HAS_FLOAT16 + - name: f16addf128 + standards: + - stdc + return_type: _Float16 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128 + - name: f16addl + standards: + - llvm_libc_ext + return_type: _Float16 + arguments: + - type: long double + - type: long double + guard: LIBC_TYPES_HAS_FLOAT16 + - name: f16div + standards: + - llvm_libc_ext + return_type: _Float16 + arguments: + - type: double + - type: double + guard: LIBC_TYPES_HAS_FLOAT16 + - name: f16divf + standards: + - llvm_libc_ext + return_type: _Float16 + arguments: + - type: float + - type: float + guard: LIBC_TYPES_HAS_FLOAT16 + - name: f16divf128 + standards: + - stdc + return_type: _Float16 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128 + - name: f16divl + standards: + - llvm_libc_ext + return_type: _Float16 + arguments: + - type: long double + - type: long double + guard: LIBC_TYPES_HAS_FLOAT16 + - name: f16fma + standards: + - llvm_libc_ext + return_type: _Float16 + arguments: + - type: double + - type: double + - type: double + guard: LIBC_TYPES_HAS_FLOAT16 + - name: f16fmaf + standards: + - llvm_libc_ext + return_type: _Float16 + arguments: + - type: float + - type: float + - type: float + guard: LIBC_TYPES_HAS_FLOAT16 + - name: f16fmaf128 + standards: + - stdc + return_type: _Float16 + arguments: + - type: float128 + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128 + - name: f16fmal + standards: + - llvm_libc_ext + return_type: _Float16 + arguments: + - type: long double + - type: long double + - type: long double + guard: LIBC_TYPES_HAS_FLOAT16 + - name: f16mul + standards: + - llvm_libc_ext + return_type: _Float16 + arguments: + - type: double + - type: double + guard: LIBC_TYPES_HAS_FLOAT16 + - name: f16mulf + standards: + - llvm_libc_ext + return_type: _Float16 + arguments: + - type: float + - type: float + guard: LIBC_TYPES_HAS_FLOAT16 + - name: f16mulf128 + standards: + - stdc + return_type: _Float16 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128 + - name: f16mull + standards: + - llvm_libc_ext + return_type: _Float16 + arguments: + - type: long double + - type: long double + guard: LIBC_TYPES_HAS_FLOAT16 + - name: f16sqrt + standards: + - llvm_libc_ext + return_type: _Float16 + arguments: + - type: double + guard: LIBC_TYPES_HAS_FLOAT16 + - name: f16sqrtf + standards: + - llvm_libc_ext + return_type: _Float16 + arguments: + - type: float + guard: LIBC_TYPES_HAS_FLOAT16 + - name: f16sqrtf128 + standards: + - llvm_libc_ext + return_type: _Float16 + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128 + - name: f16sqrtl + standards: + - llvm_libc_ext + return_type: _Float16 + arguments: + - type: long double + guard: LIBC_TYPES_HAS_FLOAT16 + - name: f16sub + standards: + - llvm_libc_ext + return_type: _Float16 + arguments: + - type: double + - type: double + guard: LIBC_TYPES_HAS_FLOAT16 + - name: f16subf + standards: + - llvm_libc_ext + return_type: _Float16 + arguments: + - type: float + - type: float + guard: LIBC_TYPES_HAS_FLOAT16 + - name: f16subf128 + standards: + - stdc + return_type: _Float16 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128 + - name: f16subl + standards: + - llvm_libc_ext + return_type: _Float16 + arguments: + - type: long double + - type: long double + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fabs + standards: + - stdc + return_type: double + arguments: + - type: double + - name: fabsf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: fabsf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fabsf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fabsl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - name: fadd + standards: + - stdc + return_type: float + arguments: + - type: double + - type: double + - name: faddf128 + standards: + - llvm_libc_ext + return_type: float + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: faddl + standards: + - faddl + return_type: float + arguments: + - type: long double + - type: long double + - 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: fdimf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fdimf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fdiml + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - name: fdiv + standards: + - stdc + return_type: float + arguments: + - type: double + - type: double + - name: fdivf128 + standards: + - llvm_libc_ext + return_type: float + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fdivl + standards: + - stdc + return_type: float + arguments: + - type: long double + - type: long double + - name: ffma + standards: + - stdc + return_type: float + arguments: + - type: double + - type: double + - type: double + - name: ffmaf128 + standards: + - llvm_libc_ext + return_type: float + arguments: + - type: float128 + - type: float128 + - type: float128 + guards: LIBC_TYPES_HAS_FLOAT128 + - name: ffmal + standards: + - stdc + return_type: float + arguments: + - type: long double + - type: long double + - type: long double + - name: floor + standards: + - stdc + return_type: double + arguments: + - type: double + - name: floorf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: floorf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: floorf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: floorl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - 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: fmax + standards: + - stdc + return_type: double + arguments: + - type: double + - type: double + - name: fmaxf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: float + - name: fmaxf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fmaxf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fmaximum + standards: + - stdc + return_type: double + arguments: + - type: double + - type: double + - name: fmaximum_mag + standards: + - stdc + return_type: double + arguments: + - type: double + - type: double + - 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_numf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fmaximum_mag_numf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fmaximum_mag_numl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - name: fmaximum_magf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: float + - name: fmaximum_magf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fmaximum_magf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fmaximum_magl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - 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_numf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fmaximum_numf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fmaximum_numl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - name: fmaximumf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: float + - name: fmaximumf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fmaximumf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fmaximuml + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - name: fmaxl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - 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: fminf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fminf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fminimum + standards: + - stdc + return_type: double + arguments: + - type: double + - type: double + - name: fminimum_mag + standards: + - stdc + return_type: double + arguments: + - type: double + - type: double + - 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_numf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fminimum_mag_numf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fminimum_mag_numl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - name: fminimum_magf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: float + - name: fminimum_magf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fminimum_magf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fminimum_magl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - 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_numf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fminimum_numf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fminimumf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: float + - name: fminimumf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fminimumf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fminimuml + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - name: fminl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - 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: fmodf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fmodf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fmodl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - name: fmul + standards: + - stdc + return_type: float + arguments: + - type: double + - type: double + - name: fmulf128 + standards: + - llvm_libc_ext + return_type: float + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fmull + standards: + - stdc + return_type: float + arguments: + - type: long double + - type: long double + - 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: frexpf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: int * + guard: LIBC_TYPES_HAS_FLOAT128 + - name: frexpf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: int * + guard: LIBC_TYPES_HAS_FLOAT16 + - name: frexpl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: int * + - 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: fromfpf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: int + - type: unsigned int + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fromfpf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: int + - type: unsigned int + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fromfpl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: int + - type: unsigned int + - 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: fromfpxf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: int + - type: unsigned int + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fromfpxf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: int + - type: unsigned int + guard: LIBC_TYPES_HAS_FLOAT16 + - name: fromfpxl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: int + - type: unsigned int + - name: fsqrt + standards: + - stdc + return_type: float + arguments: + - type: double + - name: fsqrtl + standards: + - stdc + return_type: float + arguments: + - type: long double + - name: fsqrtf128 + standards: + - llvm_libc_ext + return_type: float + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fsub + standards: + - stdc + return_type: float + arguments: + - type: double + - type: double + - name: fsubf128 + standards: + - llvm_libc_ext + return_type: float + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: fsubl + standards: + - stdc + return_type: float + arguments: + - type: long double + - type: long double + - name: getpayload + standards: + - stdc + return_type: double + arguments: + - type: double * + - name: getpayloadf + standards: + - stdc + return_type: float + arguments: + - type: float * + - name: getpayloadf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 * + guard: LIBC_TYPES_HAS_FLOAT128 + - name: getpayloadf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 * + guard: LIBC_TYPES_HAS_FLOAT16 + - name: getpayloadl + standards: + - stdc + return_type: long double + arguments: + - type: long double * + - 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: ilogbf128 + standards: + - stdc + return_type: int + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: ilogbf16 + standards: + - stdc + return_type: int + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: ilogbl + standards: + - stdc + return_type: int + arguments: + - type: long double + - name: isnan + standards: + - BSDExtensions + return_type: int + arguments: + - type: double + - name: isnanf + standards: + - BSDExtensions + return_type: int + arguments: + - type: float + - name: isnanl + standards: + - BSDExtensions + return_type: int + arguments: + - type: long double + - 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: ldexpf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: int + guard: LIBC_TYPES_HAS_FLOAT128 + - name: ldexpf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: int + guard: LIBC_TYPES_HAS_FLOAT16 + - name: ldexpl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: int + - name: lgamma + standards: + - stdc + return_type: double + arguments: + - type: double + - name: lgamma_r + standards: + - gnu + return_type: double + arguments: + - type: double + - type: int * + - name: lgammaf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: lgammaf_r + standards: + - gnu + return_type: float + arguments: + - type: float + - type: int * + - name: lgammal + standards: + - stdc + return_type: long double + arguments: + - type: long double + - name: lgammal_r + standards: + - gnu + return_type: long double + arguments: + - type: long double + - type: int * + - name: llogb + standards: + - stdc + return_type: long + arguments: + - type: double + - name: llogbf + standards: + - stdc + return_type: long + arguments: + - type: float + - name: llogbf128 + standards: + - stdc + return_type: long + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: llogbf16 + standards: + - stdc + return_type: long + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: llogbl + standards: + - stdc + return_type: long + arguments: + - type: long double + - name: llrint + standards: + - stdc + return_type: long long + arguments: + - type: double + - name: llrintf + standards: + - stdc + return_type: long long + arguments: + - type: float + - name: llrintf128 + standards: + - stdc + return_type: long long + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: llrintf16 + standards: + - stdc + return_type: long long + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: llrintl + standards: + - stdc + return_type: long long + arguments: + - type: long double + - name: llround + standards: + - stdc + return_type: long long + arguments: + - type: double + - name: llroundf + standards: + - stdc + return_type: long long + arguments: + - type: float + - name: llroundf128 + standards: + - stdc + return_type: long long + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: llroundf16 + standards: + - stdc + return_type: long long + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: llroundl + standards: + - stdc + return_type: long long + arguments: + - type: long double + - name: log + standards: + - stdc + return_type: double + arguments: + - type: double + - name: log10 + standards: + - stdc + return_type: double + arguments: + - type: double + - name: log10f + standards: + - stdc + return_type: float + arguments: + - type: float + - name: log10f16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - 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: log2f16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: logb + standards: + - stdc + return_type: double + arguments: + - type: double + - name: logbf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: logbf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: logbf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: logbl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - name: logf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: logf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: lrint + standards: + - stdc + return_type: long + arguments: + - type: double + - name: lrintf + standards: + - stdc + return_type: long + arguments: + - type: float + - name: lrintf128 + standards: + - stdc + return_type: long + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: lrintf16 + standards: + - stdc + return_type: long + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: lrintl + standards: + - stdc + return_type: long + arguments: + - type: long double + - name: lround + standards: + - stdc + return_type: long + arguments: + - type: double + - name: lroundf + standards: + - stdc + return_type: long + arguments: + - type: float + - name: lroundf128 + standards: + - stdc + return_type: long + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: lroundf16 + standards: + - stdc + return_type: long + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: lroundl + standards: + - stdc + return_type: long + arguments: + - type: long double + - 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: modff128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 * + guard: LIBC_TYPES_HAS_FLOAT128 + - name: modff16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 * + guard: LIBC_TYPES_HAS_FLOAT16 + - name: modfl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double * + - name: nan + standards: + - stdc + return_type: double + arguments: + - type: const char * + - name: nanf + standards: + - stdc + return_type: float + arguments: + - type: const char * + - name: nanf128 + standards: + - stdc + return_type: float128 + arguments: + - type: const char * + guard: LIBC_TYPES_HAS_FLOAT128 + - name: nanf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: const char * + guard: LIBC_TYPES_HAS_FLOAT16 + - name: nanl + standards: + - stdc + return_type: long double + arguments: + - type: const char * + - name: nearbyint + standards: + - stdc + return_type: double + arguments: + - type: double + - name: nearbyintf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: nearbyintf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: nearbyintf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: nearbyintl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - name: nextafter + standards: + - stdc + return_type: double + arguments: + - type: double + - type: double + - name: nextafterf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: float + - name: nextafterf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: nextafterf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: nextafterl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - name: nextdown + standards: + - stdc + return_type: double + arguments: + - type: double + - name: nextdownf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: nextdownf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: nextdownf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: nextdownl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - name: nexttoward + standards: + - stdc + return_type: double + arguments: + - type: double + - type: long double + - name: nexttowardf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: long double + - name: nexttowardf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: nexttowardl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - name: nextup + standards: + - stdc + return_type: double + arguments: + - type: double + - name: nextupf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: nextupf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: nextupf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: nextupl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - name: pow + standards: + - stdc + return_type: double + arguments: + - type: double + - type: double + - name: powf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: float + - name: powi + standards: llvm_libc_ext + return_type: double + arguments: + - type: double + - type: int + - name: powif + standards: llvm_libc_ext + return_type: float + arguments: + - type: float + - type: int + - 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: remainderf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: remainderf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: remainderl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - 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: remquof128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: float128 + - type: int * + guard: LIBC_TYPES_HAS_FLOAT128 + - name: remquof16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: _Float16 + - type: int * + guard: LIBC_TYPES_HAS_FLOAT16 + - name: remquol + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long double + - type: int * + - name: rint + standards: + - stdc + return_type: double + arguments: + - type: double + - name: rintf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: rintf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: rintf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: rintl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - name: round + standards: + - stdc + return_type: double + arguments: + - type: double + - name: roundeven + standards: + - stdc + return_type: double + arguments: + - type: double + - name: roundevenf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: roundevenf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: roundevenf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: roundevenl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - name: roundf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: roundf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: roundf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: roundl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - name: scalbln + standards: + - stdc + return_type: double + arguments: + - type: double + - type: long + - name: scalblnf + standards: + - stdc + return_type: float + arguments: + - type: float + - type: long + - name: scalblnf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: long + guard: LIBC_TYPES_HAS_FLOAT128 + - name: scalblnf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: long + guard: LIBC_TYPES_HAS_FLOAT16 + - name: scalblnf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: long + guard: LIBC_TYPES_HAS_FLOAT16 + - name: scalblnl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: long + - 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: scalbnf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: int + guard: LIBC_TYPES_HAS_FLOAT128 + - name: scalbnf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: int + guard: LIBC_TYPES_HAS_FLOAT16 + - name: scalbnl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: int + - name: setpayload + standards: + - stdc + return_type: int + arguments: + - type: double * + - type: double + - name: setpayloadf + standards: + - stdc + return_type: int + arguments: + - type: float * + - type: float + - name: setpayloadf128 + standards: + - stdc + return_type: int + arguments: + - type: float128 * + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: setpayloadf16 + standards: + - stdc + return_type: int + arguments: + - type: _Float16 * + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: setpayloadl + standards: + - stdc + return_type: int + arguments: + - type: long double * + - type: long double + - name: setpayloadsig + standards: + - stdc + return_type: double + arguments: + - type: double * + - type: double + - name: setpayloadsigf + standards: + - stdc + return_type: int + arguments: + - type: float * + - type: float + - name: setpayloadsigf128 + standards: + - stdc + return_type: int + arguments: + - type: float128 * + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: setpayloadsigf16 + standards: + - stdc + return_type: int + arguments: + - type: _Float16 * + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: setpayloadsigl + standards: + - stdc + return_type: int + arguments: + - type: long double * + - type: long double + - 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: sinf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: sinhf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: sinhf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: sinpif16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: sqrt + standards: + - stdc + return_type: double + arguments: + - type: double + - name: sqrtf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: sqrtf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: sqrtf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: sqrtl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - name: tan + standards: + - stdc + return_type: double + arguments: + - type: double + - name: tanf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: tanhf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: tanhf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: tanpif16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: totalorder + standards: + - stdc + return_type: int + arguments: + - type: const double * + - type: const double * + - name: totalorderf + standards: + - stdc + return_type: int + arguments: + - type: const float * + - type: const float * + - name: totalorderf128 + standards: + - stdc + return_type: int + arguments: + - type: const float128 * + - type: const float128 * + guard: LIBC_TYPES_HAS_FLOAT128 + - name: totalorderf16 + standards: + - stdc + return_type: int + arguments: + - type: const _Float16 * + - type: const _Float16 * + guard: LIBC_TYPES_HAS_FLOAT16 + - name: totalorderl + standards: + - stdc + return_type: int + arguments: + - type: const long double * + - type: const long double * + - name: totalordermag + standards: + - stdc + return_type: int + arguments: + - type: const double * + - type: const double * + - name: totalordermagf + standards: + - stdc + return_type: int + arguments: + - type: const float * + - type: const float * + - name: totalordermagl + standards: + - stdc + return_type: int + arguments: + - type: const long double * + - type: const long double * + - name: totalordermagf128 + standards: + - stdc + return_type: int + arguments: + - type: const float128 * + - type: const float128 * + guard: LIBC_TYPES_HAS_FLOAT128 + - name: totalordermagf16 + standards: + - stdc + return_type: int + arguments: + - type: const _Float16 * + - type: const _Float16 * + guard: LIBC_TYPES_HAS_FLOAT16 + - name: trunc + standards: + - stdc + return_type: double + arguments: + - type: double + - name: truncf + standards: + - stdc + return_type: float + arguments: + - type: float + - name: truncf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + guard: LIBC_TYPES_HAS_FLOAT128 + - name: truncf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + guard: LIBC_TYPES_HAS_FLOAT16 + - name: truncl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - 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: ufromfpf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: int + - type: unsigned int + guard: LIBC_TYPES_HAS_FLOAT128 + - name: ufromfpf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: int + - type: unsigned int + guard: LIBC_TYPES_HAS_FLOAT16 + - name: ufromfpl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: int + - type: unsigned int + - 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: ufromfpxf128 + standards: + - stdc + return_type: float128 + arguments: + - type: float128 + - type: int + - type: unsigned int + guard: LIBC_TYPES_HAS_FLOAT128 + - name: ufromfpxf16 + standards: + - stdc + return_type: _Float16 + arguments: + - type: _Float16 + - type: int + - type: unsigned int + guard: LIBC_TYPES_HAS_FLOAT16 + - name: ufromfpxl + standards: + - stdc + return_type: long double + arguments: + - type: long double + - type: int + - type: unsigned int diff --git a/libc/include/pthread.h.def b/libc/include/pthread.h.def index 4dbeed6b5f32..aa1e9983e4bb 100644 --- a/libc/include/pthread.h.def +++ b/libc/include/pthread.h.def @@ -10,39 +10,7 @@ #define LLVM_LIBC_PTHREAD_H #include "__llvm-libc-common.h" - -// TODO: move to a pthreads-macros.h file: -// https://github.com/llvm/llvm-project/issues/88997 - -#define PTHREAD_STACK_MIN (1 << 14) // 16KB - -#define PTHREAD_MUTEX_INITIALIZER {0} -#define PTHREAD_RWLOCK_INITIALIZER {} -#define PTHREAD_ONCE_INIT {0} - -enum { - PTHREAD_CREATE_JOINABLE = 0x0, - PTHREAD_CREATE_DETACHED = 0x1, - - PTHREAD_MUTEX_NORMAL = 0x0, - PTHREAD_MUTEX_ERRORCHECK = 0x1, - PTHREAD_MUTEX_RECURSIVE = 0x2, - PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL, - - PTHREAD_PROCESS_PRIVATE = 0x0, - PTHREAD_PROCESS_SHARED = 0x1, - - PTHREAD_MUTEX_STALLED = 0x0, - PTHREAD_MUTEX_ROBUST = 0x1, -}; - -#define PTHREAD_PROCESS_PRIVATE 0 -#define PTHREAD_PROCESS_SHARED 1 - -#define PTHREAD_RWLOCK_PREFER_READER_NP 0 -#define PTHREAD_RWLOCK_PREFER_WRITER_NP 1 -#define PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP 2 - +#include "llvm-libc-macros/pthread-macros.h" %%public_api() diff --git a/libc/include/pthread.yaml b/libc/include/pthread.yaml new file mode 100644 index 000000000000..b9068c3f1765 --- /dev/null +++ b/libc/include/pthread.yaml @@ -0,0 +1,433 @@ +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_rwlock_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 + - type_name: pthread_spinlock_t +enums: [] +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_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_init + standards: + - POSIX + return_type: int + arguments: + - type: pthread_attr_t * + - 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_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_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_init + standards: + - POSIX + return_type: int + arguments: + - type: pthread_mutexattr_t * + - 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_rwlock_clockrdlock + standards: POSIX + return_type: int + arguments: + - type: pthread_rwlock_t *__restrict + - type: clockid_t + - type: const struct timespec *__restrict + - name: pthread_rwlock_clockwrlock + standards: POSIX + return_type: int + arguments: + - type: pthread_rwlock_t *__restrict + - type: clockid_t + - type: const struct timespec *__restrict + - name: pthread_rwlock_destroy + standards: POSIX + return_type: int + arguments: + - type: pthread_rwlock_t * + - name: pthread_rwlock_init + standards: POSIX + return_type: int + arguments: + - type: pthread_rwlock_t * + - type: const pthread_rwlockattr_t *__restrict + - name: pthread_rwlock_rdlock + standards: POSIX + return_type: int + arguments: + - type: pthread_rwlock_t * + - name: pthread_rwlock_timedrdlock + standards: POSIX + return_type: int + arguments: + - type: pthread_rwlock_t *__restrict + - type: const struct timespec *__restrict + - name: pthread_rwlock_timedwrlock + standards: POSIX + return_type: int + arguments: + - type: pthread_rwlock_t *__restrict + - type: const struct timespec *__restrict + - name: pthread_rwlock_tryrdlock + standards: POSIX + return_type: int + arguments: + - type: pthread_rwlock_t * + - name: pthread_rwlock_trywrlock + standards: POSIX + return_type: int + arguments: + - type: pthread_rwlock_t * + - name: pthread_rwlock_unlock + standards: POSIX + return_type: int + arguments: + - type: pthread_rwlock_t * + - name: pthread_rwlock_wrlock + standards: POSIX + return_type: int + arguments: + - type: pthread_rwlock_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_self + standards: + - POSIX + return_type: pthread_t + arguments: + - type: void + - name: pthread_setname_np + standards: + - GNUExtensions + return_type: int + arguments: + - type: pthread_t + - type: const char * + - name: pthread_setspecific + standards: + - POSIX + return_type: void * + arguments: + - type: pthread_key_t + - type: const void * + - name: pthread_spin_destroy + standards: POSIX + return_type: int + arguments: + - type: pthread_spinlock_t * + - name: pthread_spin_init + standards: POSIX + return_type: int + arguments: + - type: pthread_spinlock_t * + - type: int + - name: pthread_spin_lock + standards: POSIX + return_type: int + arguments: + - type: pthread_spinlock_t * + - name: pthread_spin_trylock + standards: POSIX + return_type: int + arguments: + - type: pthread_spinlock_t * + - name: pthread_spin_unlock + standards: POSIX + return_type: int + arguments: + - type: pthread_spinlock_t * diff --git a/libc/include/sched.yaml b/libc/include/sched.yaml new file mode 100644 index 000000000000..2d4876b722ab --- /dev/null +++ b/libc/include/sched.yaml @@ -0,0 +1,88 @@ +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_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 diff --git a/libc/include/search.yaml b/libc/include/search.yaml new file mode 100644 index 000000000000..a0c73bc679d8 --- /dev/null +++ b/libc/include/search.yaml @@ -0,0 +1,70 @@ +header: search.h +macros: [] +types: + - type_name: struct_hsearch_data + - type_name: ENTRY + - type_name: ACTION + - type_name: __lsearchcompare_t +enums: [] +objects: [] +functions: + - name: hcreate + standards: + - POSIX + return_type: int + arguments: + - type: size_t + - name: hcreate_r + standards: GNUExtensions + return_type: int + arguments: + - type: size_t + - type: struct hsearch_data * + - name: hdestroy + standards: GNUExtensions + return_type: void + arguments: [] + - name: hdestroy_r + standards: + - POSIX + return_type: void + arguments: + - type: struct hsearch_data * + - name: hsearch + standards: + - POSIX + return_type: ENTRY * + arguments: + - type: ENTRY + - type: ACTION + - name: hsearch_r + standards: GNUExtensions + return_type: int + arguments: + - type: ENTRY + - type: ACTION + - type: ENTRY * * + - type: struct hsearch_data * + - name: insque + standards: + - POSIX + return_type: void + arguments: + - type: void * + - type: void * + - name: remque + standards: + - POSIX + return_type: void + arguments: + - type: void * + - name: lfind + standards: + - POSIX + return_type: void * + arguments: + - type: const void * + - type: const void * + - type: size_t * + - type: size_t + - type: __lsearchcompare_t diff --git a/libc/include/setjmp.yaml b/libc/include/setjmp.yaml new file mode 100644 index 000000000000..68e3ff046e4b --- /dev/null +++ b/libc/include/setjmp.yaml @@ -0,0 +1,20 @@ +header: setjmp.h +macros: [] +types: + - type_name: jmp_buf +enums: [] +objects: [] +functions: + - name: longjmp + standards: + - stdc + return_type: _Noreturn void + arguments: + - type: jmp_buf + - type: int + - name: setjmp + standards: + - stdc + return_type: int + arguments: + - type: jmp_buf diff --git a/libc/include/signal.yaml b/libc/include/signal.yaml new file mode 100644 index 000000000000..c66abb1a8744 --- /dev/null +++ b/libc/include/signal.yaml @@ -0,0 +1,82 @@ +header: signal.h +macros: [] +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: kill + standards: + - POSIX + return_type: int + arguments: + - type: pid_t + - type: int + - name: raise + standards: + - stdc + return_type: int + arguments: + - type: int + - name: sigaction + standards: + - POSIX + return_type: int + arguments: + - type: int + - type: const struct sigaction *__restrict + - type: struct sigaction *__restrict + - name: sigaddset + standards: + - POSIX + return_type: int + arguments: + - type: sigset_t * + - type: int + - 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: sigemptyset + standards: + - POSIX + return_type: int + arguments: + - type: sigset_t * + - 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 + - name: sigprocmask + standards: + - POSIX + return_type: int + arguments: + - type: int + - type: const sigset_t *__restrict + - type: sigset_t *__restrict diff --git a/libc/include/spawn.yaml b/libc/include/spawn.yaml new file mode 100644 index 000000000000..be3f4e99d27f --- /dev/null +++ b/libc/include/spawn.yaml @@ -0,0 +1,58 @@ +header: spawn.h +macros: [] +types: + - type_name: posix_spawn_file_actions_t + - type_name: posix_spawnattr_t + - type_name: pid_t + - type_name: mode_t +enums: [] +objects: [] +functions: + - name: posix_spawn + standards: + - POSIX + return_type: int + arguments: + - type: pid_t *__restrict + - type: const char *__restrict + - type: posix_spawn_file_actions_t * + - type: posix_spawnattr_t *__restrict + - type: const char *__restrict * + - type: const char *__restrict * + - name: posix_spawn_file_actions_addclose + standards: + - POSIX + return_type: int + arguments: + - type: posix_spawn_file_actions_t * + - type: int + - name: posix_spawn_file_actions_adddup2 + standards: + - POSIX + return_type: int + arguments: + - type: posix_spawn_file_actions_t * + - type: int + - type: int + - name: posix_spawn_file_actions_addopen + standards: + - POSIX + return_type: int + arguments: + - type: posix_spawn_file_actions_t *__restrict + - type: int + - type: const char *__restrict + - type: int + - type: mode_t + - name: posix_spawn_file_actions_destroy + standards: + - POSIX + return_type: int + arguments: + - type: posix_spawn_file_actions_t * + - name: posix_spawn_file_actions_init + standards: + - POSIX + return_type: int + arguments: + - type: posix_spawn_file_actions_t * diff --git a/libc/include/stdbit.yaml b/libc/include/stdbit.yaml new file mode 100644 index 000000000000..25d2d326c30e --- /dev/null +++ b/libc/include/stdbit.yaml @@ -0,0 +1,396 @@ +header: stdbit.h +macros: [] +types: [] +enums: [] +objects: [] +functions: + - name: stdc_bit_ceil_uc + standards: + - stdc + return_type: unsigned char + arguments: + - type: unsigned char + - name: stdc_bit_ceil_ui + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned int + - name: stdc_bit_ceil_ul + standards: + - stdc + return_type: unsigned long + arguments: + - type: unsigned long + - name: stdc_bit_ceil_ull + standards: + - stdc + return_type: unsigned long long + arguments: + - type: unsigned long long + - name: stdc_bit_ceil_us + standards: + - stdc + return_type: unsigned short + arguments: + - type: unsigned short + - name: stdc_bit_floor_uc + standards: + - stdc + return_type: unsigned char + arguments: + - type: unsigned char + - name: stdc_bit_floor_ui + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned int + - name: stdc_bit_floor_ul + standards: + - stdc + return_type: unsigned long + arguments: + - type: unsigned long + - name: stdc_bit_floor_ull + standards: + - stdc + return_type: unsigned long long + arguments: + - type: unsigned long long + - name: stdc_bit_floor_us + standards: + - stdc + return_type: unsigned short + arguments: + - type: unsigned short + - name: stdc_bit_width_uc + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned char + - name: stdc_bit_width_ui + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned int + - name: stdc_bit_width_ul + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned long + - name: stdc_bit_width_ull + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned long long + - name: stdc_bit_width_us + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned short + - name: stdc_count_ones_uc + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned char + - name: stdc_count_ones_ui + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned int + - name: stdc_count_ones_ul + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned long + - name: stdc_count_ones_ull + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned long long + - name: stdc_count_ones_us + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned short + - name: stdc_count_zeros_uc + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned char + - name: stdc_count_zeros_ui + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned int + - name: stdc_count_zeros_ul + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned long + - name: stdc_count_zeros_ull + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned long long + - name: stdc_count_zeros_us + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned short + - name: stdc_first_leading_one_uc + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned char + - name: stdc_first_leading_one_ui + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned int + - name: stdc_first_leading_one_ul + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned long + - name: stdc_first_leading_one_ull + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned long long + - name: stdc_first_leading_one_us + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned short + - name: stdc_first_leading_zero_uc + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned char + - name: stdc_first_leading_zero_ui + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned int + - name: stdc_first_leading_zero_ul + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned long + - name: stdc_first_leading_zero_ull + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned long long + - name: stdc_first_leading_zero_us + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned short + - name: stdc_first_trailing_one_uc + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned char + - name: stdc_first_trailing_one_ui + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned int + - name: stdc_first_trailing_one_ul + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned long + - name: stdc_first_trailing_one_ull + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned long long + - name: stdc_first_trailing_one_us + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned short + - name: stdc_has_single_bit_uc + standards: + - stdc + return_type: bool + arguments: + - type: unsigned char + - name: stdc_has_single_bit_ui + standards: + - stdc + return_type: bool + arguments: + - type: unsigned int + - name: stdc_has_single_bit_ul + standards: + - stdc + return_type: bool + arguments: + - type: unsigned long + - name: stdc_has_single_bit_ull + standards: + - stdc + return_type: bool + arguments: + - type: unsigned long long + - name: stdc_has_single_bit_us + standards: + - stdc + return_type: bool + arguments: + - type: unsigned short + - name: stdc_leading_ones_uc + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned char + - name: stdc_leading_ones_ui + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned int + - name: stdc_leading_ones_ul + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned long + - name: stdc_leading_ones_ull + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned long long + - name: stdc_leading_ones_us + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned short + - name: stdc_leading_zeros_uc + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned char + - name: stdc_leading_zeros_ui + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned int + - name: stdc_leading_zeros_ul + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned long + - name: stdc_leading_zeros_ull + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned long long + - name: stdc_leading_zeros_us + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned short + - name: stdc_trailing_ones_uc + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned char + - name: stdc_trailing_ones_ui + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned int + - name: stdc_trailing_ones_ul + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned long + - name: stdc_trailing_ones_ull + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned long long + - name: stdc_trailing_ones_us + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned short + - name: stdc_trailing_zeros_uc + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned char + - name: stdc_trailing_zeros_ui + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned int + - name: stdc_trailing_zeros_ul + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned long + - name: stdc_trailing_zeros_ull + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned long long + - name: stdc_trailing_zeros_us + standards: + - stdc + return_type: unsigned int + arguments: + - type: unsigned short diff --git a/libc/include/stdckdint.yaml b/libc/include/stdckdint.yaml new file mode 100644 index 000000000000..ea8fc47625b0 --- /dev/null +++ b/libc/include/stdckdint.yaml @@ -0,0 +1,8 @@ +header: stdckdint.h +standards: + - stdc +macros: [] +types: [] +enums: [] +objects: [] +functions: [] diff --git a/libc/include/stdfix.yaml b/libc/include/stdfix.yaml new file mode 100644 index 000000000000..9787eaba45e4 --- /dev/null +++ b/libc/include/stdfix.yaml @@ -0,0 +1,307 @@ +header: stdfix.h +macros: [] +types: + - type_name: stdfix-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: 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: absr + standards: + - stdc_ext + return_type: fract + arguments: + - type: 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: hrbits + standards: + - stdc_ext + return_type: short fract + arguments: + - type: int_hr_t + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: uhrbits + standards: + - stdc_ext + return_type: unsigned short fract + arguments: + - type: uint_uhr_t + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: rbits + standards: + - stdc_ext + return_type: fract + arguments: + - type: int_r_t + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: urbits + standards: + - stdc_ext + return_type: unsigned fract + arguments: + - type: uint_ur_t + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: lrbits + standards: + - stdc_ext + return_type: long fract + arguments: + - type: int_lr_t + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: ulrbits + standards: + - stdc_ext + return_type: unsigned long fract + arguments: + - type: uint_ulr_t + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: hkbits + standards: + - stdc_ext + return_type: short accum + arguments: + - type: int_hk_t + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: uhkbits + standards: + - stdc_ext + return_type: unsigned short accum + arguments: + - type: uint_uhk_t + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: kbits + standards: + - stdc_ext + return_type: accum + arguments: + - type: int_k_t + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: ukbits + standards: + - stdc_ext + return_type: unsigned accum + arguments: + - type: uint_uk_t + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: lkbits + standards: + - stdc_ext + return_type: long accum + arguments: + - type: uint_ulr_t + guard: LIBC_COMPILER_HAS_FIXED_POINT + - name: ulkbits + standards: + - stdc_ext + return_type: unsigned long accum + arguments: + - type: uint_ulk_t + 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: 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: roundr + standards: + - stdc_ext + return_type: fract + arguments: + - type: 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: 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: roundur + standards: + - stdc_ext + return_type: unsigned fract + arguments: + - type: unsigned 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: sqrtulk + standards: llvm_libc_stdfix_ext + return_type: unsigned long accum + arguments: + - type: unsigned long accum + 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: sqrtur + standards: + - stdc_ext + - llvm_libc_stdfix_ext + return_type: unsigned fract + arguments: + - type: unsigned fract + 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/include/stdint.yaml b/libc/include/stdint.yaml new file mode 100644 index 000000000000..8887f596bc8a --- /dev/null +++ b/libc/include/stdint.yaml @@ -0,0 +1,8 @@ +header: stdint.h +standards: + - stdc +macros: [] +types: [] +enums: [] +objects: [] +functions: [] diff --git a/libc/include/stdio.yaml b/libc/include/stdio.yaml new file mode 100644 index 000000000000..fd116bbc0089 --- /dev/null +++ b/libc/include/stdio.yaml @@ -0,0 +1,397 @@ +header: stdio.h +macros: + - macro_name: stdout + macro_value: stdout + - macro_name: stdin + macro_value: stdin + - macro_name: stderr + macro_value: stderr +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: asprintf + standards: + - GNUExtensions + return_type: int + arguments: + - type: char **__restrict + - type: const char *__restrict + - type: '...' + - 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: fdopen + standards: + - POSIX + return_type: FILE * + arguments: + - type: int + - type: const char * + - 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: fflush + standards: + - stdc + 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: fileno + standards: + - POSIX + return_type: int + arguments: + - type: FILE * + - name: flockfile + standards: + - POSIX + return_type: void + arguments: + - type: FILE * + - name: fopen + standards: + - stdc + return_type: FILE * + arguments: + - type: const char * + - type: const char * + - name: fopencookie + standards: + - GNUExtensions + return_type: FILE * + arguments: + - type: void * + - type: const char * + - type: cookie_io_functions_t + - name: fprintf + standards: + - stdc + return_type: int + arguments: + - type: FILE *__restrict + - type: const char *__restrict + - type: '...' + - 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: 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: fscanf + standards: + - stdc + return_type: int + arguments: + - type: FILE *__restrict + - type: const char *__restrict + - type: '...' + - name: vfscanf + standards: + - stdc + return_type: int + arguments: + - type: FILE *__restrict + - type: const char *__restrict + - type: va_list + - 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: printf + standards: + - stdc + return_type: int + arguments: + - type: const char *__restrict + - type: '...' + - 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: 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: scanf + standards: + - stdc + return_type: int + arguments: + - type: const char *__restrict + - type: '...' + - name: vscanf + standards: + - stdc + return_type: int + arguments: + - type: const char *__restrict + - type: va_list + - 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: snprintf + standards: + - stdc + return_type: int + arguments: + - type: char *__restrict + - type: size_t + - type: const char *__restrict + - type: '...' + - name: sprintf + standards: + - stdc + return_type: int + arguments: + - type: char *__restrict + - type: const char *__restrict + - type: '...' + - name: sscanf + standards: + - stdc + return_type: int + arguments: + - type: const char *__restrict + - type: const char *__restrict + - type: '...' + - name: ungetc + standards: + - stdc + return_type: int + arguments: + - type: int + - type: FILE * + - name: vasprintf + standards: + - GNUExtensions + return_type: int + arguments: + - type: char **__restrict + - 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: vsnprintf + standards: + - stdc + return_type: int + arguments: + - type: char *__restrict + - type: size_t + - type: const char *__restrict + - type: va_list + - name: vsprintf + standards: + - stdc + return_type: int + arguments: + - type: char *__restrict + - type: const char *__restrict + - type: va_list + - name: vsscanf + standards: + - stdc + return_type: int + arguments: + - type: const char *__restrict + - type: const char *__restrict + - type: va_list diff --git a/libc/include/stdlib.yaml b/libc/include/stdlib.yaml new file mode 100644 index 000000000000..c6c95e421cee --- /dev/null +++ b/libc/include/stdlib.yaml @@ -0,0 +1,341 @@ +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: _Exit + standards: + - stdc + return_type: _Noreturn void + arguments: + - type: int + - name: abort + standards: + - stdc + return_type: _Noreturn void + arguments: + - type: void + - name: abs + standards: + - stdc + return_type: int + arguments: + - type: int + - name: aligned_alloc + standards: + - stdc + return_type: void * + arguments: + - type: size_t + - type: size_t + - 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: atof + standards: + - stdc + return_type: double + arguments: + - type: const char *__restrict + - name: atoi + standards: + - stdc + return_type: int + arguments: + - type: const char * + - 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: calloc + standards: + - stdc + return_type: void * + arguments: + - type: size_t + - type: size_t + - name: div + standards: + - stdc + return_type: div_t + arguments: + - type: int + - type: int + - name: exit + standards: + - stdc + return_type: _Noreturn void + arguments: + - type: int + - name: free + standards: + - stdc + return_type: void + arguments: + - type: void * + - name: getenv + standards: + - stdc + return_type: char * + arguments: + - type: const char * + - 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: malloc + standards: + - stdc + return_type: void * + arguments: + - type: size_t + - 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: quick_exit + standards: + - stdc + return_type: _Noreturn void + arguments: + - type: int + - name: rand + standards: + - stdc + return_type: int + arguments: + - type: void + - name: realloc + standards: + - stdc + return_type: void * + arguments: + - type: void * + - type: size_t + - 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: strtod_l + standards: + - stdc + return_type: double + arguments: + - type: const char *__restrict + - type: char **__restrict + - type: locale_t + - name: strtof_l + standards: + - stdc + return_type: float + arguments: + - type: const char *__restrict + - type: char **__restrict + - type: locale_t + - name: strtol_l + standards: + - stdc + return_type: long + arguments: + - type: const char *__restrict + - type: char **__restrict + - type: int + - type: locale_t + - name: strtold_l + standards: + - stdc + return_type: long double + arguments: + - type: const char *__restrict + - type: char **__restrict + - type: locale_t + - name: strtoll_l + standards: + - stdc + return_type: long long + arguments: + - type: const char *__restrict + - type: char **__restrict + - type: int + - type: locale_t + - name: strtoul_l + standards: + - stdc + return_type: unsigned long + arguments: + - type: const char *__restrict + - type: char **__restrict + - type: int + - type: locale_t + - name: strtoull_l + standards: + - stdc + return_type: unsigned long long + arguments: + - type: const char *__restrict + - type: char **__restrict + - type: int + - type: locale_t + - name: system + standards: + - stdc + return_type: int + arguments: + - type: const char * diff --git a/libc/include/string.yaml b/libc/include/string.yaml new file mode 100644 index 000000000000..af1750e91243 --- /dev/null +++ b/libc/include/string.yaml @@ -0,0 +1,319 @@ +header: string.h +macros: [] +types: + - type_name: size_t +enums: [] +objects: [] +functions: + - name: memccpy + standards: + - POSIX + return_type: void * + arguments: + - type: void *__restrict + - type: const void *__restrict + - type: int + - type: size_t + - name: memchr + standards: + - stdc + return_type: void * + arguments: + - type: const void * + - type: int + - type: size_t + - name: memcmp + standards: + - stdc + return_type: int + arguments: + - type: const void * + - type: const void * + - type: size_t + - name: memcpy + standards: + - stdc + return_type: void * + arguments: + - type: void *__restrict + - type: const void *__restrict + - type: size_t + - name: memmem + standards: + - GNUExtensions + return_type: void * + arguments: + - type: const void * + - type: size_t + - type: const void * + - type: size_t + - name: memmove + standards: + - stdc + return_type: void * + arguments: + - type: void * + - type: const void * + - type: size_t + - name: mempcpy + standards: + - POSIX + return_type: void * + arguments: + - type: void *__restrict + - type: const void *__restrict + - type: size_t + - name: memrchr + standards: + - GNUExtensions + 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: 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: strcasestr + standards: + - GNUExtensions + return_type: char * + arguments: + - type: const char * + - type: const char * + - name: strcat + standards: + - stdc + return_type: char * + arguments: + - type: char *__restrict + - type: const char *__restrict + - name: strchr + standards: + - stdc + return_type: char * + arguments: + - type: const char * + - type: int + - name: strchrnul + standards: + - GNUExtensions + return_type: char * + arguments: + - type: const char * + - type: int + - 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: strcoll_l + standards: + - stdc + return_type: int + arguments: + - type: const char * + - type: const char * + - type: locale_t + - name: strcpy + standards: + - stdc + return_type: char * + arguments: + - type: char *__restrict + - type: const char *__restrict + - 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: strerror + standards: + - stdc + return_type: char * + arguments: + - type: int + - name: strerror_r + standards: + - GNUExtensions + return_type: char * + arguments: + - type: int + - type: char * + - type: size_t + - name: strlcat + standards: + - BSDExtensions + return_type: size_t + arguments: + - type: char *__restrict + - type: const char *__restrict + - type: size_t + - name: strlcpy + standards: + - BSDExtensions + return_type: size_t + arguments: + - type: char *__restrict + - type: const char *__restrict + - type: size_t + - name: strlen + standards: + - stdc + return_type: size_t + arguments: + - type: const char * + - name: strncat + standards: + - stdc + return_type: char * + arguments: + - type: char * + - type: const char * + - type: size_t + - name: strncmp + standards: + - stdc + return_type: int + arguments: + - type: const char * + - type: const char * + - type: size_t + - name: strncpy + standards: + - stdc + return_type: char * + arguments: + - type: char *__restrict + - type: const char *__restrict + - type: size_t + - name: strndup + standards: + - stdc + return_type: char * + arguments: + - type: const char * + - type: size_t + - name: strnlen + standards: + - POSIX + return_type: size_t + 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: strsep + standards: + - BSDExtensions + return_type: char * + arguments: + - type: char **__restrict + - type: const char *__restrict + - name: strsignal + standards: + - POSIX + return_type: char * + arguments: + - 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: strtok_r + standards: + - POSIX + return_type: char * + arguments: + - type: char *__restrict + - type: const char *__restrict + - type: char ** __restrict + - name: strxfrm + standards: + - stdc + return_type: size_t + arguments: + - type: char *__restrict + - type: const char *__restrict + - type: size_t + - name: strxfrm_l + standards: + - stdc + return_type: size_t + arguments: + - type: char *__restrict + - type: const char *__restrict + - type: size_t + - type: locale_t diff --git a/libc/include/strings.yaml b/libc/include/strings.yaml new file mode 100644 index 000000000000..ca91b626740c --- /dev/null +++ b/libc/include/strings.yaml @@ -0,0 +1,58 @@ +header: strings.h +macros: [] +types: [] +enums: [] +objects: [] +functions: + - name: bcmp + standards: + - llvm_libc_ext + return_type: int + arguments: + - type: const void * + - type: const void * + - type: size_t + - 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: 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 + - 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 diff --git a/libc/include/sys/auxv.yaml b/libc/include/sys/auxv.yaml new file mode 100644 index 000000000000..9d546b358824 --- /dev/null +++ b/libc/include/sys/auxv.yaml @@ -0,0 +1,12 @@ +header: sys-auxv.h +macros: [] +types: [] +enums: [] +objects: [] +functions: + - name: getauxval + standards: + - GNUExtensions + return_type: unsigned long + arguments: + - type: unsigned long diff --git a/libc/include/sys/epoll.yaml b/libc/include/sys/epoll.yaml new file mode 100644 index 000000000000..ee188c17fedc --- /dev/null +++ b/libc/include/sys/epoll.yaml @@ -0,0 +1,60 @@ +header: sys-epoll.h +macros: [] +types: + - type_name: struct_epoll_event + - type_name: struct_epoll_data + - type_name: sigset_t + - type_name: struct_timespec +enums: [] +objects: [] +functions: + - name: epoll_create + standards: + - Linux + return_type: int + arguments: + - type: int + - name: epoll_create1 + standards: + - Linux + return_type: int + arguments: + - type: int + - name: epoll_ctl + standards: + - Linux + return_type: int + arguments: + - type: int + - type: int + - type: int + - type: struct epoll_event * + - name: epoll_pwait + standards: + - Linux + return_type: int + arguments: + - type: int + - type: struct epoll_event * + - type: int + - type: int + - type: const sigset_t * + - name: epoll_pwait2 + standards: + - Linux + return_type: int + arguments: + - type: int + - type: struct epoll_event * + - type: int + - type: const struct timespec * + - type: const sigset_t * + - name: epoll_wait + standards: + - Linux + return_type: int + arguments: + - type: int + - type: struct epoll_event * + - type: int + - type: int diff --git a/libc/include/sys/ioctl.yaml b/libc/include/sys/ioctl.yaml new file mode 100644 index 000000000000..ffe73a84d51b --- /dev/null +++ b/libc/include/sys/ioctl.yaml @@ -0,0 +1,7 @@ +header: sys-ioctl.h +standards: POSIX +macros: [] +types: [] +enums: [] +objects: [] +functions: [] diff --git a/libc/include/sys/mman.yaml b/libc/include/sys/mman.yaml new file mode 100644 index 000000000000..962ca3591917 --- /dev/null +++ b/libc/include/sys/mman.yaml @@ -0,0 +1,134 @@ +header: sys-mman.h +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: 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: mlockall + standards: + - POSIX + return_type: int + arguments: + - 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: mremap + standards: + - POSIX + return_type: void * + arguments: + - type: void * + - type: size_t + - type: size_t + - type: int + - type: '...' + - name: mprotect + standards: + - POSIX + return_type: int + arguments: + - type: void * + - type: size_t + - type: int + - name: msync + standards: + - POSIX + return_type: int + arguments: + - type: void * + - type: size_t + - type: int + - name: munlock + standards: POSIX + return_type: int + arguments: + - type: void * + - type: size_t + - name: munlockall + standards: + - POSIX + return_type: int + arguments: + - type: void + - 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 + - name: remap_file_pages + standards: + - Linux + return_type: int + arguments: + - type: void * + - type: size_t + - type: int + - 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 * diff --git a/libc/include/sys/prctl.yaml b/libc/include/sys/prctl.yaml new file mode 100644 index 000000000000..82374be87d5d --- /dev/null +++ b/libc/include/sys/prctl.yaml @@ -0,0 +1,16 @@ +header: sys-prctl.h +macros: [] +types: [] +enums: [] +objects: [] +functions: + - name: prctl + standards: + - Linux + return_type: int + arguments: + - type: int + - type: unsigned long + - type: unsigned long + - type: unsigned long + - type: unsigned long diff --git a/libc/include/sys/random.yaml b/libc/include/sys/random.yaml new file mode 100644 index 000000000000..228bb50d5db9 --- /dev/null +++ b/libc/include/sys/random.yaml @@ -0,0 +1,16 @@ +header: sys-random.h +macros: [] +types: + - type_name: ssize_t + - type_name: size_t +enums: [] +objects: [] +functions: + - name: getrandom + standards: + - Linux + return_type: ssize_t + arguments: + - type: void * + - type: size_t + - type: unsigned int diff --git a/libc/include/sys/resource.yaml b/libc/include/sys/resource.yaml new file mode 100644 index 000000000000..85ea1ad12f19 --- /dev/null +++ b/libc/include/sys/resource.yaml @@ -0,0 +1,20 @@ +header: sys-resource.h +macros: [] +types: + - type_name: struct_rlimit + - type_name: rlim_t +enums: [] +objects: [] +functions: + - name: getrlimit + standards: + - POSIX + return_type: int + arguments: + - type: struct rlimit * + - name: setrlimit + standards: + - POSIX + return_type: int + arguments: + - type: const struct rlimit diff --git a/libc/include/sys/select.yaml b/libc/include/sys/select.yaml new file mode 100644 index 000000000000..c6806122aa81 --- /dev/null +++ b/libc/include/sys/select.yaml @@ -0,0 +1,22 @@ +header: sys-select.h +macros: [] +types: + - type_name: struct_timeval + - type_name: struct_timespec + - type_name: suseconds_t + - type_name: sigset_t + - type_name: time_t + - type_name: fd_set +enums: [] +objects: [] +functions: + - name: select + standards: + - POSIX + return_type: int + arguments: + - type: int + - type: fd_set *__restrict + - type: fd_set *__restrict + - type: fd_set *__restrict + - type: struct timeval *__restrict diff --git a/libc/include/sys/sendfile.yaml b/libc/include/sys/sendfile.yaml new file mode 100644 index 000000000000..7e45e40e171d --- /dev/null +++ b/libc/include/sys/sendfile.yaml @@ -0,0 +1,18 @@ +header: sys-sendfile.h +macros: [] +types: + - type_name: ssize_t + - type_name: size_t + - type_name: off_t +enums: [] +objects: [] +functions: + - name: sendfile + standards: + - GNUExtensions + return_type: ssize_t + arguments: + - type: int + - type: int + - type: off_t * + - type: size_t diff --git a/libc/include/sys/socket.yaml b/libc/include/sys/socket.yaml new file mode 100644 index 000000000000..47d835fa5f4a --- /dev/null +++ b/libc/include/sys/socket.yaml @@ -0,0 +1,118 @@ +header: sys-socket.h +macros: [] +types: + - type_name: struct_sockaddr_un + - type_name: struct_sockaddr + - type_name: socklen_t + - type_name: sa_family_t + - type_name: struct_msghdr + - type_name: struct_iovec + - type_name: size_t + - type_name: ssize_t +enums: [] +objects: [] +functions: + - name: accept + standards: + - POSIX + return_type: int + arguments: + - type: int + - type: sockaddr *__restrict + - type: socklen_t *__restrict + - name: bind + standards: + - POSIX + return_type: int + arguments: + - type: int + - type: const struct sockaddr * + - type: socklen_t + - name: connect + standards: + - POSIX + return_type: int + arguments: + - type: int + - type: const struct sockaddr * + - type: socklen_t + - name: listen + standards: + - POSIX + return_type: int + arguments: + - type: int + - type: int + - name: recv + standards: + - POSIX + return_type: ssize_t + arguments: + - type: int + - type: void * + - type: size_t + - type: int + - name: recvfrom + standards: + - POSIX + return_type: ssize_t + arguments: + - type: int + - type: void * + - type: size_t + - type: int + - type: struct sockaddr *__restrict + - type: socklen_t *__restrict + - name: recvmsg + standards: + - POSIX + return_type: ssize_t + arguments: + - type: int + - type: struct msghdr * + - type: int + - name: send + standards: + - POSIX + return_type: ssize_t + arguments: + - type: int + - type: const void* + - type: size_t + - type: int + - name: sendmsg + standards: + - POSIX + return_type: ssize_t + arguments: + - type: int + - type: const struct msghdr * + - type: int + - name: sendto + standards: + - POSIX + return_type: ssize_t + arguments: + - type: int + - type: const void * + - type: size_t + - type: int + - type: const struct sockaddr * + - type: socklen_t + - name: socket + standards: + - POSIX + return_type: int + arguments: + - type: int + - type: int + - type: int + - name: socketpair + standards: + - posix + return_type: int + arguments: + - type: int + - type: int + - type: int + - type: int* diff --git a/libc/include/sys/stat.yaml b/libc/include/sys/stat.yaml new file mode 100644 index 000000000000..ed500f832f90 --- /dev/null +++ b/libc/include/sys/stat.yaml @@ -0,0 +1,77 @@ +header: sys-stat.h +macros: [] +types: + - type_name: blkcnt_t + - type_name: blksize_t + - type_name: off_t + - type_name: struct_timeval + - type_name: gid_t + - type_name: struct_stat + - type_name: uid_t + - type_name: nlink_t + - type_name: dev_t + - type_name: struct_timespec + - type_name: ino_t + - type_name: mode_t +enums: [] +objects: [] +functions: + - name: chmod + standards: + - POSIX + return_type: int + arguments: + - type: const char * + - type: mode_t + - name: fchmod + standards: + - POSIX + return_type: int + arguments: + - type: int + - type: mode_t + - name: fchmodat + standards: + - POSIX + return_type: int + arguments: + - type: int + - type: const char * + - type: mode_t + - type: int + - name: fstat + standards: + - POSIX + return_type: int + arguments: + - type: int + - type: struct stat * + - name: lstat + standards: + - POSIX + return_type: int + arguments: + - type: const char *__restrict + - type: struct stat *__restrict + - name: mkdir + standards: + - POSIX + return_type: int + arguments: + - type: const char * + - type: mode_t + - name: mkdirat + standards: + - POSIX + return_type: int + arguments: + - type: int + - type: const char * + - type: mode_t + - name: stat + standards: + - POSIX + return_type: int + arguments: + - type: const char *__restrict + - type: struct stat *__restrict diff --git a/libc/include/sys/statvfs.yaml b/libc/include/sys/statvfs.yaml new file mode 100644 index 000000000000..22e0ef22c413 --- /dev/null +++ b/libc/include/sys/statvfs.yaml @@ -0,0 +1,23 @@ +header: sys-statvfs.h +macros: [] +types: + - type_name: struct_statvfs + - type_name: fsblkcnt_t + - type_name: fsfilcnt_t +enums: [] +objects: [] +functions: + - name: fstatvfs + standards: + - POSIX + return_type: int + arguments: + - type: int + - type: struct statvfs * + - name: statvfs + standards: + - POSIX + return_type: int + arguments: + - type: const char *__restrict + - type: struct statvfs *__restrict diff --git a/libc/include/sys/syscall.h.def b/libc/include/sys/syscall.h.def index 11758ea8336d..03c19eb0885e 100644 --- a/libc/include/sys/syscall.h.def +++ b/libc/include/sys/syscall.h.def @@ -2349,12 +2349,5 @@ #define SYS_writev __NR_writev #endif -#ifdef __NR_process_mrelease -#define SYS_process_mrelease __NR_process_mrelease -#endif - -#ifdef __NR_pidfd_open -#define SYS_pidfd_open __NR_pidfd_open -#endif #endif // LLVM_LIBC_SYS_SYSCALL_H diff --git a/libc/include/sys/syscall.yaml b/libc/include/sys/syscall.yaml new file mode 100644 index 000000000000..c0a64338b6f7 --- /dev/null +++ b/libc/include/sys/syscall.yaml @@ -0,0 +1,7 @@ +header: sys-syscall.h +standards: Linux +macros: [] +types: [] +enums: [] +functions: [] +objects: [] diff --git a/libc/include/sys/time.yaml b/libc/include/sys/time.yaml new file mode 100644 index 000000000000..eb3dd548389b --- /dev/null +++ b/libc/include/sys/time.yaml @@ -0,0 +1,7 @@ +header: sys-time.h +standards: Linux +macros: [] +types: [] +enums: [] +functions: [] +objects: [] diff --git a/libc/include/sys/types.yaml b/libc/include/sys/types.yaml new file mode 100644 index 000000000000..15eaf107f691 --- /dev/null +++ b/libc/include/sys/types.yaml @@ -0,0 +1,31 @@ +header: sys-types.h +standards: POSIX +macros: [] +types: + - type_name: uid_t + - type_name: time_t + - type_name: pthread_t + - type_name: pthread_rwlock_t + - type_name: pthread_rwlockattr_t + - type_name: pthread_mutex_t + - type_name: blkcnt_t + - type_name: blksize_t + - type_name: clockid_t + - type_name: ssize_t + - type_name: pthread_mutexattr_t + - type_name: ino_t + - type_name: pthread_once_t + - type_name: mode_t + - type_name: dev_t + - type_name: pthread_attr_t + - type_name: gid_t + - type_name: pid_t + - type_name: nlink_t + - type_name: suseconds_t + - type_name: off_t + - type_name: size_t + - type_name: pthread_key_t + - type_name: pthread_condattr_t +enums: [] +objects: [] +functions: [] diff --git a/libc/include/sys/utsname.yaml b/libc/include/sys/utsname.yaml new file mode 100644 index 000000000000..eecd55b18082 --- /dev/null +++ b/libc/include/sys/utsname.yaml @@ -0,0 +1,13 @@ +header: sys-utsname.h +macros: [] +types: + - type_name: struct_utsname +enums: [] +objects: [] +functions: + - name: uname + standards: + - POSIX + return_type: int + arguments: + - type: struct utsname * diff --git a/libc/include/sys/wait.yaml b/libc/include/sys/wait.yaml new file mode 100644 index 000000000000..4f0c69baee2c --- /dev/null +++ b/libc/include/sys/wait.yaml @@ -0,0 +1,33 @@ +header: 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/include/termios.yaml b/libc/include/termios.yaml new file mode 100644 index 000000000000..e9c4cd375d0b --- /dev/null +++ b/libc/include/termios.yaml @@ -0,0 +1,85 @@ +header: termios.h +macros: [] +types: + - type_name: tcflag_t + - type_name: struct_termios + - type_name: speed_t + - type_name: pid_t + - type_name: cc_t +enums: [] +objects: [] +functions: + - name: cfgetispeed + standards: + - POSIX + return_type: speed_t + arguments: + - type: const struct termios * + - name: cfgetospeed + standards: + - POSIX + return_type: speed_t + arguments: + - type: const struct termios * + - name: cfsetispeed + standards: + - POSIX + return_type: speed_t + arguments: + - type: struct termios * + - type: speed_t + - name: cfsetospeed + standards: + - POSIX + return_type: speed_t + arguments: + - type: struct termios * + - type: speed_t + - name: tcdrain + standards: + - POSIX + return_type: int + arguments: + - type: int + - name: tcflow + standards: + - POSIX + return_type: int + arguments: + - type: int + - type: int + - name: tcflush + standards: + - POSIX + return_type: int + arguments: + - type: int + - type: int + - name: tcgetattr + standards: + - POSIX + return_type: int + arguments: + - type: int + - type: struct termios * + - name: tcgetsid + standards: + - POSIX + return_type: pid_t + arguments: + - type: int + - name: tcsendbreak + standards: + - POSIX + return_type: int + arguments: + - type: int + - type: int + - name: tcsetattr + standards: + - POSIX + return_type: int + arguments: + - type: int + - type: int + - type: struct termios * diff --git a/libc/include/threads.yaml b/libc/include/threads.yaml new file mode 100644 index 000000000000..aadcaf5f66e0 --- /dev/null +++ b/libc/include/threads.yaml @@ -0,0 +1,161 @@ +header: threads.h +macros: + - macro_name: ONCE_FLAG_INIT + macro_value: '{0}' +types: + - type_name: once_flag + - type_name: __call_once_func_t + - type_name: cnd_t + - type_name: mtx_t + - type_name: thrd_start_t + - type_name: thrd_t + - type_name: tss_t + - type_name: tss_dtor_t +enums: + - name: mtx_plain + value: null + - name: mtx_recursive + value: null + - name: mtx_timed + value: null + - name: thrd_timedout + value: null + - name: thrd_success + value: null + - name: thrd_busy + value: null + - name: thrd_error + value: null + - name: thrd_nomem + value: null +objects: [] +functions: + - name: call_once + standards: + - stdc + return_type: void + arguments: + - type: once_flag * + - type: __call_once_func_t + - name: cnd_broadcast + standards: + - stdc + return_type: int + arguments: + - type: cnd_t * + - name: cnd_destroy + standards: + - stdc + return_type: void + arguments: + - type: cnd_t * + - name: cnd_init + standards: + - stdc + return_type: int + arguments: + - type: cnd_t * + - name: cnd_signal + standards: + - stdc + return_type: int + arguments: + - type: cnd_t * + - name: cnd_wait + standards: + - stdc + return_type: int + arguments: + - type: cnd_t * + - type: mtx_t * + - name: mtx_destroy + standards: + - stdc + return_type: int + arguments: + - type: void + - name: mtx_init + standards: + - stdc + return_type: int + arguments: + - type: mtx_t * + - type: int + - name: mtx_lock + standards: + - stdc + return_type: int + arguments: + - type: mtx_t * + - name: mtx_unlock + standards: + - stdc + return_type: int + arguments: + - type: mtx_t * + - name: thrd_create + standards: + - stdc + return_type: int + arguments: + - type: thrd_t * + - type: thrd_start_t + - type: void * + - name: thrd_current + standards: + - stdc + return_type: thrd_t + arguments: + - type: void + - name: thrd_detach + standards: + - stdc + return_type: int + arguments: + - type: thrd_t + - name: thrd_equal + standards: + - stdc + return_type: int + arguments: + - type: thrd_t + - type: thrd_t + - name: thrd_exit + standards: + - stdc + return_type: void + arguments: + - type: int + - name: thrd_join + standards: + - stdc + return_type: int + arguments: + - type: thrd_t + - type: int * + - name: tss_create + standards: + - stdc + return_type: int + arguments: + - type: tss_t * + - type: tss_dtor_t + - name: tss_delete + standards: + - stdc + return_type: int + arguments: + - type: tss_t + - name: tss_get + standards: + - stdc + return_type: void * + arguments: + - type: tss_t + - name: tss_set + standards: + - stdc + return_type: int + arguments: + - type: tss_t + - type: void * diff --git a/libc/include/time.yaml b/libc/include/time.yaml new file mode 100644 index 000000000000..3f745e5ee338 --- /dev/null +++ b/libc/include/time.yaml @@ -0,0 +1,105 @@ +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 + - type_name: size_t +enums: [] +objects: [] +functions: + - name: asctime + standard: + - stdc + return_type: char * + arguments: + - type: const struct tm * + - name: asctime_r + standard: + - stdc + return_type: char * + arguments: + - type: struct tm * + - type: char * + - name: ctime + standard: + - stdc + return_type: char * + arguments: + - type: const time_t * + - name: ctime_r + standard: + - stdc + return_type: char * + arguments: + - type: const time_t * + - type: char * + - name: clock + standard: + - stdc + return_type: clock_t + arguments: + - type: void + - name: clock_gettime + standard: + - POSIX + return_type: int + arguments: + - type: clockid_t + - type: struct timespec * + - 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 * + - name: timespec_get + standard: + - stdc + return_type: int + arguments: + - type: struct timespec * + - type: int diff --git a/libc/include/uchar.yaml b/libc/include/uchar.yaml new file mode 100644 index 000000000000..18ca840612e0 --- /dev/null +++ b/libc/include/uchar.yaml @@ -0,0 +1,13 @@ +header: uchar.h +standards: + - stdc +macros: [] +types: + - type_name: char32_t + - type_name: char16_t + - type_name: char8_t + - type_name: mbstate_t + - type_name: size_t +enums: [] +objects: [] +functions: [] diff --git a/libc/include/unistd.yaml b/libc/include/unistd.yaml new file mode 100644 index 000000000000..c6441c04ce3a --- /dev/null +++ b/libc/include/unistd.yaml @@ -0,0 +1,322 @@ +header: unistd.h +macros: [] +types: + - type_name: uid_t + - type_name: ssize_t + - type_name: size_t + - type_name: pid_t + - type_name: off_t + - type_name: __getoptargv_t + - type_name: __exec_envp_t + - type_name: __exec_argv_t +enums: [] +objects: + - object_name: environ + object_type: char ** + - object_name: optarg + object_type: char * + - object_name: optind + object_type: int + - object_name: opterr + object_type: int + - object_name: optopt + object_type: int +functions: + - name: __llvm_libc_syscall + standards: + - POSIX + return_type: long + arguments: + - type: long + - type: long + - type: long + - type: long + - type: long + - type: long + - type: long + - name: _exit + standards: + - POSIX + return_type: _Noreturn void + arguments: + - type: int + - name: access + standards: + - POSIX + return_type: int + arguments: + - type: const char * + - type: int + - name: chdir + standards: + - POSIX + return_type: int + arguments: + - type: const char * + - name: close + standards: + - POSIX + return_type: int + arguments: + - type: int + - name: dup + standards: + - POSIX + return_type: int + arguments: + - type: int + - name: dup2 + standards: + - POSIX + return_type: int + arguments: + - type: int + - type: int + - name: dup3 + standards: + - POSIX + return_type: int + arguments: + - type: int + - type: int + - type: int + - name: execv + standards: + - POSIX + return_type: int + arguments: + - type: const char * + - type: __exec_argv_t + - name: execve + standards: + - POSIX + return_type: int + arguments: + - type: const char * + - type: __exec_argv_t + - type: __exec_envp_t + - name: fchdir + standards: + - POSIX + return_type: int + arguments: + - type: int + - name: fork + standards: + - POSIX + return_type: pid_t + arguments: + - type: void + - name: fsync + standards: + - POSIX + return_type: int + arguments: + - type: int + - name: ftruncate + standards: + - POSIX + return_type: int + arguments: + - type: int + - type: off_t + - name: getcwd + standards: + - POSIX + return_type: char * + arguments: + - type: char * + - type: size_t + - name: geteuid + standards: + - POSIX + return_type: uid_t + arguments: + - type: void + - name: getopt + standards: + - POSIX + return_type: int + arguments: + - type: int + - type: __getoptargv_t + - type: const char * + - name: getpid + standards: + - POSIX + return_type: int + arguments: + - type: void + - name: getppid + standards: + - POSIX + return_type: int + arguments: + - type: void + - name: gettid + standards: + - Linux + return_type: pid_t + arguments: + - type: void + - name: getuid + standards: + - POSIX + return_type: uid_t + arguments: + - type: void + - name: isatty + standards: + - POSIX + return_type: int + arguments: + - type: int + guard: null + attributes: [] + - name: link + standards: + - POSIX + return_type: int + arguments: + - type: const char * + - type: const char * + - name: linkat + standards: + - POSIX + return_type: int + arguments: + - type: int + - type: const char * + - type: int + - type: const char * + - type: int + - name: lseek + standards: + - POSIX + return_type: off_t + arguments: + - type: int + - type: off_t + - type: int + - name: pipe + standards: + - POSIX + return_type: int + arguments: + - type: int * + - name: pipe2 + standards: + - Linux + return_type: int + arguments: + - type: int * + - type: int + - name: pread + standards: + - POSIX + return_type: ssize_t + arguments: + - type: int + - type: void * + - type: size_t + - type: off_t + - name: pwrite + standards: + - POSIX + return_type: ssize_t + arguments: + - type: int + - type: const void * + - type: size_t + - type: off_t + - name: read + standards: + - POSIX + return_type: ssize_t + arguments: + - type: int + - type: void * + - type: size_t + - name: readlink + standards: + - POSIX + return_type: ssize_t + arguments: + - type: const char *__restrict + - type: char *__restrict + - type: size_t + - name: readlinkat + standards: + - POSIX + return_type: ssize_t + arguments: + - type: const char *__restrict + - type: char *__restrict + - type: size_t + - name: rmdir + standards: + - POSIX + return_type: int + arguments: + - type: const char * + - name: swab + standards: + - POSIX + return_type: void + arguments: + - type: const void *__restrict + - type: void * + - type: ssize_t + - name: symlink + standards: + - POSIX + return_type: int + arguments: + - type: const char * + - type: const char * + - name: symlinkat + standards: + - POSIX + return_type: int + arguments: + - type: int + - type: const char * + - type: int + - type: const char * + - name: sysconf + standards: + - POSIX + return_type: int + arguments: + - type: int + - name: truncate + standards: + - POSIX + return_type: int + arguments: + - type: const char * + - type: off_t + - name: unlink + standards: + - POSIX + return_type: int + arguments: + - type: const char * + - name: unlinkat + standards: + - POSIX + return_type: int + arguments: + - type: int + - type: const char * + - type: int + - name: write + standards: + - POSIX + return_type: ssize_t + arguments: + - type: int + - type: const void * + - type: size_t + guard: null + attributes: [] diff --git a/libc/include/wchar.yaml b/libc/include/wchar.yaml new file mode 100644 index 000000000000..bc824b21d8be --- /dev/null +++ b/libc/include/wchar.yaml @@ -0,0 +1,16 @@ +header: wchar.h +macros: [] +types: + - type_name: size_t + - type_name: wint_t + - type_name: wchar_t + - type_name: mbstate_t +enums: [] +objects: [] +functions: + - name: wctob + standards: + - stdc + return_type: int + arguments: + - type: wint_t |
