Skip to content

[libc] added rest of yaml files for new headergen #96977

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 28, 2024

Conversation

RoseZhang03
Copy link
Contributor

Added yaml files containing functions from only one standard.
Also added one combined standard yaml file (errno.yaml).
assert.yaml is still work in progress.

Added yaml files containing functions from only one standard.
Also added one combined standard yaml file (errno.yaml).
assert.yaml is still work in progress.
@llvmbot llvmbot added the libc label Jun 27, 2024
@llvmbot
Copy link
Member

llvmbot commented Jun 27, 2024

@llvm/pr-subscribers-libc

Author: None (RoseZhang03)

Changes

Added yaml files containing functions from only one standard.
Also added one combined standard yaml file (errno.yaml).
assert.yaml is still work in progress.


Patch is 47.85 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/96977.diff

33 Files Affected:

  • (added) libc/newhdrgen/yaml/gnu_ext_sys_sendfile.yaml (+18)
  • (added) libc/newhdrgen/yaml/gnu_sys_auxv.yaml (+8)
  • (added) libc/newhdrgen/yaml/gpu_ext_rpc.yaml (+27)
  • (added) libc/newhdrgen/yaml/linux_sys_epoll.yaml (+72)
  • (added) libc/newhdrgen/yaml/linux_sys_prctl.yaml (+7)
  • (added) libc/newhdrgen/yaml/linux_sys_random.yaml (+18)
  • (added) libc/newhdrgen/yaml/linux_sys_statvfs.yaml (+23)
  • (added) libc/newhdrgen/yaml/linux_sys_time.yaml (+8)
  • (added) libc/newhdrgen/yaml/posix_arpa_inet.yaml (+41)
  • (added) libc/newhdrgen/yaml/posix_dirent.yaml (+58)
  • (added) libc/newhdrgen/yaml/posix_fcntl.yaml (+48)
  • (added) libc/newhdrgen/yaml/posix_search.yaml (+76)
  • (added) libc/newhdrgen/yaml/posix_spawn.yaml (+70)
  • (added) libc/newhdrgen/yaml/posix_sys_ioctl.yaml (+7)
  • (added) libc/newhdrgen/yaml/posix_sys_resource.yaml (+24)
  • (added) libc/newhdrgen/yaml/posix_sys_select.yaml (+24)
  • (added) libc/newhdrgen/yaml/posix_sys_socket.yaml (+30)
  • (added) libc/newhdrgen/yaml/posix_sys_stat.yaml (+93)
  • (added) libc/newhdrgen/yaml/posix_sys_types.yaml (+30)
  • (added) libc/newhdrgen/yaml/posix_sys_utsname.yaml (+15)
  • (added) libc/newhdrgen/yaml/posix_termios.yaml (+107)
  • (added) libc/newhdrgen/yaml/posix_unistd.yaml (+414)
  • (added) libc/newhdrgen/yaml/stdc_float.yaml (+8)
  • (added) libc/newhdrgen/yaml/stdc_inttypes.yaml (+44)
  • (added) libc/newhdrgen/yaml/stdc_limits.yaml (+8)
  • (added) libc/newhdrgen/yaml/stdc_setjmp.yaml (+20)
  • (added) libc/newhdrgen/yaml/stdc_stdbit.yaml (+526)
  • (added) libc/newhdrgen/yaml/stdc_stdckdint.yaml (+8)
  • (added) libc/newhdrgen/yaml/stdc_stdint.yaml (+8)
  • (added) libc/newhdrgen/yaml/stdc_threads.yaml (+184)
  • (added) libc/newhdrgen/yaml/stdc_uchar.yaml (+12)
  • (added) libc/newhdrgen/yaml/stdc_wchar.yaml (+17)
  • (added) libc/newhdrgen/yaml_combined/errno.yaml (+10)
diff --git a/libc/newhdrgen/yaml/gnu_ext_sys_sendfile.yaml b/libc/newhdrgen/yaml/gnu_ext_sys_sendfile.yaml
new file mode 100644
index 0000000000000..8743bf01b99ba
--- /dev/null
+++ b/libc/newhdrgen/yaml/gnu_ext_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/newhdrgen/yaml/gnu_sys_auxv.yaml b/libc/newhdrgen/yaml/gnu_sys_auxv.yaml
new file mode 100644
index 0000000000000..beea1d8b5f09f
--- /dev/null
+++ b/libc/newhdrgen/yaml/gnu_sys_auxv.yaml
@@ -0,0 +1,8 @@
+header: sys-auxv.h
+standards: 
+  - GNUExtensions
+macros: []
+types: []
+enums: []
+objects: []
+functions: []
diff --git a/libc/newhdrgen/yaml/gpu_ext_rpc.yaml b/libc/newhdrgen/yaml/gpu_ext_rpc.yaml
new file mode 100644
index 0000000000000..3a9348ba5a395
--- /dev/null
+++ b/libc/newhdrgen/yaml/gpu_ext_rpc.yaml
@@ -0,0 +1,27 @@
+header: gpu-rpc.h
+macros: []
+types: []
+enums: []
+objects: []
+functions:
+  - name: rpc_host_call
+    standards: 
+      - GPUExtensions
+    return_type: void
+    arguments:
+      - type: void *
+      - type: void *
+      - type: size_t
+    guard: null
+    attributes: []
+  - name: rpc_fprintf
+    standards: 
+      - GPUExtensions
+    return_type: int
+    arguments:
+      - type: ::FILE *__restrict
+      - type: const char *__restrict
+      - type: void *
+      - type: size_t
+    guard: null
+    attributes: []
diff --git a/libc/newhdrgen/yaml/linux_sys_epoll.yaml b/libc/newhdrgen/yaml/linux_sys_epoll.yaml
new file mode 100644
index 0000000000000..f9d2a7c8b0830
--- /dev/null
+++ b/libc/newhdrgen/yaml/linux_sys_epoll.yaml
@@ -0,0 +1,72 @@
+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
+    guard: null
+    attributes: []
+  - name: epoll_create1
+    standards: 
+      - Linux
+    return_type: int
+    arguments:
+      - type: int
+    guard: null
+    attributes: []
+  - name: epoll_ctl
+    standards: 
+      - Linux
+    return_type: int
+    arguments:
+      - type: int
+      - type: int
+      - type: int
+      - type: struct epoll_event *
+    guard: null
+    attributes: []
+  - name: epoll_wait
+    standards: 
+      - Linux
+    return_type: int
+    arguments:
+      - type: int
+      - type: struct epoll_event *
+      - type: int
+      - type: int
+    guard: null
+    attributes: []
+  - name: epoll_pwait
+    standards: 
+      - Linux
+    return_type: int
+    arguments:
+      - type: int
+      - type: struct epoll_event *
+      - type: int
+      - type: int
+      - type: const sigset_t *
+    guard: null
+    attributes: []
+  - 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 *
+    guard: null
+    attributes: []
diff --git a/libc/newhdrgen/yaml/linux_sys_prctl.yaml b/libc/newhdrgen/yaml/linux_sys_prctl.yaml
new file mode 100644
index 0000000000000..35289f6274e7a
--- /dev/null
+++ b/libc/newhdrgen/yaml/linux_sys_prctl.yaml
@@ -0,0 +1,7 @@
+header: sys-prctl.h
+standards: Linux
+macros: []
+types: []
+enums: []
+objects: []
+functions: []
diff --git a/libc/newhdrgen/yaml/linux_sys_random.yaml b/libc/newhdrgen/yaml/linux_sys_random.yaml
new file mode 100644
index 0000000000000..3aaae2dda6cf4
--- /dev/null
+++ b/libc/newhdrgen/yaml/linux_sys_random.yaml
@@ -0,0 +1,18 @@
+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
+    guard: null
+    attributes: []
diff --git a/libc/newhdrgen/yaml/linux_sys_statvfs.yaml b/libc/newhdrgen/yaml/linux_sys_statvfs.yaml
new file mode 100644
index 0000000000000..8d0004beef690
--- /dev/null
+++ b/libc/newhdrgen/yaml/linux_sys_statvfs.yaml
@@ -0,0 +1,23 @@
+header: sys-statvfs.h
+macros: []
+types:
+  - type_name: struct_statvfs
+enums: []
+objects: []
+functions:
+  - name: statvfs
+    standards: 
+      - Linux
+    return_type: int
+    arguments:
+      - type: const char *__restrict
+      - type: struct statvfs *__restrict
+    guard: null
+    attributes: []
+  - name: fstatvfs
+    standards: 
+      - Linux
+    return_type: int
+    arguments: 
+      - type: int
+      - type: struct statvfs *
diff --git a/libc/newhdrgen/yaml/linux_sys_time.yaml b/libc/newhdrgen/yaml/linux_sys_time.yaml
new file mode 100644
index 0000000000000..a901cdafd26a1
--- /dev/null
+++ b/libc/newhdrgen/yaml/linux_sys_time.yaml
@@ -0,0 +1,8 @@
+header: sys-time.h
+standards: Linux
+macros: []
+types:
+  - type_name: struct_timeval
+enums: []
+functions: []
+objects: []
diff --git a/libc/newhdrgen/yaml/posix_arpa_inet.yaml b/libc/newhdrgen/yaml/posix_arpa_inet.yaml
new file mode 100644
index 0000000000000..ae4bf1be47e82
--- /dev/null
+++ b/libc/newhdrgen/yaml/posix_arpa_inet.yaml
@@ -0,0 +1,41 @@
+header: arpa-inet.h
+macros: []
+types:
+  - type_name: uint32_t
+  - type_name: uint16_t
+  - type_name: inttypes.h
+enums: []
+objects: []
+functions:
+  - name: htonl
+    standards: 
+      - POSIX
+    return_type: uint32_t
+    arguments:
+      - type: uint32_t
+    guard: null
+    attributes: []
+  - name: htons
+    standards: 
+      - POSIX
+    return_type: uint16_t
+    arguments:
+      - type: uint16_t
+    guard: null
+    attributes: []
+  - name: ntohl
+    standards: 
+      - POSIX
+    return_type: uint32_t
+    arguments:
+      - type: uint32_t
+    guard: null
+    attributes: []
+  - name: ntohs
+    standards: 
+      - POSIX
+    return_type: uint16_t
+    arguments:
+      - type: uint16_t
+    guard: null
+    attributes: []
diff --git a/libc/newhdrgen/yaml/posix_dirent.yaml b/libc/newhdrgen/yaml/posix_dirent.yaml
new file mode 100644
index 0000000000000..3665a8847b6be
--- /dev/null
+++ b/libc/newhdrgen/yaml/posix_dirent.yaml
@@ -0,0 +1,58 @@
+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 **
+    guard: null
+    attributes: []
+  - name: closedir
+    standards: 
+      - POSIX
+    return_type: int
+    arguments:
+      - type: DIR *
+    guard: null
+    attributes: []
+  - name: dirfd
+    standards: 
+      - POSIX
+    return_type: int
+    arguments:
+      - type: DIR *
+    guard: null
+    attributes: []
+  - name: fdopendir
+    standards: 
+      - POSIX
+    return_type: DIR *
+    arguments:
+      - type: int
+    guard: null
+    attributes: []
+  - name: opendir
+    standards: 
+      - POSIX
+    return_type: DIR *
+    arguments:
+      - type: const char *
+    guard: null
+    attributes: []
+  - name: readdir
+    standards: 
+      - POSIX
+    return_type: struct dirent *
+    arguments:
+      - type: DIR *
+    guard: null
+    attributes: []
diff --git a/libc/newhdrgen/yaml/posix_fcntl.yaml b/libc/newhdrgen/yaml/posix_fcntl.yaml
new file mode 100644
index 0000000000000..1ef92e7fa2882
--- /dev/null
+++ b/libc/newhdrgen/yaml/posix_fcntl.yaml
@@ -0,0 +1,48 @@
+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
+    guard: null
+    attributes: []
+  - name: fcntl
+    standards: 
+      - POSIX
+    return_type: int
+    arguments:
+      - type: int
+      - type: int
+      - type: ...
+    guard: null
+    attributes: []
+  - name: open
+    standards: 
+      - POSIX
+    return_type: int
+    arguments:
+      - type: const char *
+      - type: int
+      - type: ...
+    guard: null
+    attributes: []
+  - name: openat
+    standards: 
+      - POSIX
+    return_type: int
+    arguments:
+      - type: int
+      - type: const char *
+      - type: int
+      - type: ...
+    guard: null
+    attributes: []
diff --git a/libc/newhdrgen/yaml/posix_search.yaml b/libc/newhdrgen/yaml/posix_search.yaml
new file mode 100644
index 0000000000000..ac890b1577d8f
--- /dev/null
+++ b/libc/newhdrgen/yaml/posix_search.yaml
@@ -0,0 +1,76 @@
+header: search.h
+macros: []
+types:
+  - type_name: size_t
+  - type_name: struct_hsearch_data
+  - type_name: ENTRY
+  - type_name: ACTION
+enums: []
+objects: []
+functions:
+  - name: hcreate
+    standards: 
+      - POSIX
+    return_type: int
+    arguments:
+      - type: size_t
+    guard: null
+    attributes: []
+  - name: hcreate_r
+    standards: GNUExtensions
+    return_type: int
+    arguments:
+      - type: size_t
+      - type: struct hsearch_data *
+    guard: null
+    attributes: []
+  - name: hsearch
+    standards: 
+      - POSIX
+    return_type: ENTRY *
+    arguments:
+      - type: ENTRY
+      - type: ACTION
+    guard: null
+    attributes: []
+  - name: hsearch_r
+    standards: GNUExtensions
+    return_type: int
+    arguments:
+      - type: ENTRY
+      - type: ACTION
+      - type: ENTRY * *
+      - type: struct hsearch_data *
+    guard: null
+    attributes: []
+  - name: hdestroy
+    standards: GNUExtensions 
+    return_type: void
+    arguments: []
+    guard: null
+    attributes: []
+  - name: hdestroy_r
+    standards: 
+      - POSIX
+    return_type: void
+    arguments:
+      - type: struct hsearch_data *
+    guard: null
+    attributes: []
+  - name: insque
+    standards: 
+      - POSIX
+    return_type: void
+    arguments:
+      - type: void *
+      - type: void *
+    guard: null
+    attributes: []
+  - name: remque
+    standards: 
+      - POSIX
+    return_type: void
+    arguments:
+      - type: void *
+    guard: null
+    attributes: []
diff --git a/libc/newhdrgen/yaml/posix_spawn.yaml b/libc/newhdrgen/yaml/posix_spawn.yaml
new file mode 100644
index 0000000000000..b5394c5d230be
--- /dev/null
+++ b/libc/newhdrgen/yaml/posix_spawn.yaml
@@ -0,0 +1,70 @@
+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 *
+    guard: null
+    attributes: []
+  - name: posix_spawn_file_actions_addclose
+    standards: 
+      - POSIX
+    return_type: int
+    arguments:
+      - type: posix_spawn_file_actions_t *
+      - type: int
+    guard: null
+    attributes: []
+  - name: posix_spawn_file_actions_adddup2
+    standards: 
+      - POSIX
+    return_type: int
+    arguments:
+      - type: posix_spawn_file_actions_t *
+      - type: int
+      - type: int
+    guard: null
+    attributes: []
+  - 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
+    guard: null
+    attributes: []
+  - name: posix_spawn_file_actions_destroy
+    standards: 
+      - POSIX
+    return_type: int
+    arguments:
+      - type: posix_spawn_file_actions_t *
+    guard: null
+    attributes: []
+  - name: posix_spawn_file_actions_init
+    standards: 
+      - POSIX
+    return_type: int
+    arguments:
+      - type: posix_spawn_file_actions_t *
+    guard: null
+    attributes: []
diff --git a/libc/newhdrgen/yaml/posix_sys_ioctl.yaml b/libc/newhdrgen/yaml/posix_sys_ioctl.yaml
new file mode 100644
index 0000000000000..ffe73a84d51b9
--- /dev/null
+++ b/libc/newhdrgen/yaml/posix_sys_ioctl.yaml
@@ -0,0 +1,7 @@
+header: sys-ioctl.h
+standards: POSIX
+macros: []
+types: []
+enums: []
+objects: []
+functions: []
diff --git a/libc/newhdrgen/yaml/posix_sys_resource.yaml b/libc/newhdrgen/yaml/posix_sys_resource.yaml
new file mode 100644
index 0000000000000..56404c6e8767d
--- /dev/null
+++ b/libc/newhdrgen/yaml/posix_sys_resource.yaml
@@ -0,0 +1,24 @@
+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 *
+    guard: null
+    attributes: []
+  - name: setrlimit
+    standards: 
+      - POSIX
+    return_type: int
+    arguments:
+      - type: const struct rlimit
+    guard: null
+    attributes: []
diff --git a/libc/newhdrgen/yaml/posix_sys_select.yaml b/libc/newhdrgen/yaml/posix_sys_select.yaml
new file mode 100644
index 0000000000000..2e38ac438209e
--- /dev/null
+++ b/libc/newhdrgen/yaml/posix_sys_select.yaml
@@ -0,0 +1,24 @@
+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
+    guard: null
+    attributes: []
diff --git a/libc/newhdrgen/yaml/posix_sys_socket.yaml b/libc/newhdrgen/yaml/posix_sys_socket.yaml
new file mode 100644
index 0000000000000..b9310cba77261
--- /dev/null
+++ b/libc/newhdrgen/yaml/posix_sys_socket.yaml
@@ -0,0 +1,30 @@
+header: sys-socket.h
+macros: []
+types:
+  - type_name: struct_sockaddr_un
+  - type_name: struct_sockaddr
+  - type_name: socklen_t
+  - type_name: sa_family_t
+enums: []
+objects: []
+functions:
+  - name: socket
+    standards: 
+      - POSIX
+    return_type: int
+    arguments:
+      - type: int
+      - type: int
+      - type: int
+    guard: null
+    attributes: []
+  - name: bind
+    standards: 
+      - POSIX
+    return_type: int
+    arguments:
+      - type: int
+      - type: const struct sockaddr *
+      - type: socklen_t
+    guard: null
+    attributes: []
diff --git a/libc/newhdrgen/yaml/posix_sys_stat.yaml b/libc/newhdrgen/yaml/posix_sys_stat.yaml
new file mode 100644
index 0000000000000..7f90dd9c1b764
--- /dev/null
+++ b/libc/newhdrgen/yaml/posix_sys_stat.yaml
@@ -0,0 +1,93 @@
+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
+    guard: null
+    attributes: []
+  - name: fchmod
+    standards: 
+      - POSIX
+    return_type: int
+    arguments:
+      - type: int
+      - type: mode_t
+    guard: null
+    attributes: []
+  - name: fchmodat
+    standards: 
+      - POSIX
+    return_type: int
+    arguments:
+      - type: int
+      - type: const char *
+      - type: mode_t
+      - type: int
+    guard: null
+    attributes: []
+  - name: fstat
+    standards: 
+      - POSIX
+    return_type: int
+    arguments:
+      - type: int
+      - type: struct stat *
+    guard: null
+    attributes: []
+  - name: lstat
+    standards: 
+      - POSIX
+    return_type: int
+    arguments:
+      - type: const char *__restrict
+      - type: struct stat *__restrict
+    guard: null
+    attributes: []
+  - name: mkdir
+    standards: 
+      - POSIX
+    return_type: int
+    arguments:
+      - type: const char *
+      - type: mode_t
+    guard: null
+    attributes: []
+  - name: mkdirat
+    standards: 
+      - POSIX
+    return_type: int
+    arguments:
+      - type: int
+      - type: const char *
+      - type: mode_t
+    guard: null
+    attributes: []
+  - name: stat
+    standards: 
+      - POSIX
+    return_type: int
+    arguments:
+      - type: const char *__restrict
+      - type: struct stat *__restrict
+    guard: null
+    attributes: []
diff --git a/libc/newhdrgen/yaml/posix_sys_types.yaml b/libc/newhdrgen/yaml/posix_sys_types.yaml
new file mode 100644
index 0000000000000..6b08254a7fab1
--- /dev/null
+++ b/libc/newhdrgen/yaml/posix_sys_types.yaml
@@ -0,0 +1,30 @@
+header: sys-types.h
+standards: POSIX
+macros: []
+types:
+  - type_name: uid_t
+  - type_name: time_t
+  - type_name: pthread_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: []
+functions: []
+objects: []
diff --git a/libc/newhdrgen/yaml/posix_sys_utsname.yaml b/libc/newhdrgen/yaml/posix_sys_utsname.yaml
new file mode 100644
index 0000000000000..75404c6fed49c
--- /dev/null
+++ b/libc/newhdrgen/yaml/posix_sys_utsname.yaml
@@ -0,0 +1,15 @@
+header: sys-utsname.h
+macros: []
+types:
+  - type_name: struct_utsname
+enums: []
+objects: []
+functions:
+  - name: uname
+    standards: 
+      - POSIX
+    return_type: int
+    arguments:
+      - type: struct utsname *
+    guard: null
+    attributes: []
diff --git a/libc/newhdrgen/yaml/posix_termios.yaml b/libc/newhdrgen/yaml/posix_termios.yaml
new file mode 100644
index 0000000000000..ff76481e14b13
--- /dev/null
+++ b/libc/newhdrgen/yaml/posix_termios.yaml
@@ -0,0 +1,107 @@
+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 *
+    guard: null
+    attributes: []
+  - name: cfgetospeed
+    standards: 
+      - POSIX
+    return_type: speed_t
+    arguments:
+      - type: const struct termios *
+    guard: null
+    attributes: []
+  - name: cfsetispeed
+    standards: 
+      - POSIX
+    return_type: int
+    arguments:
+      - type: struct termios *
+      - type: speed_t
+    guard: null
+    attributes: []
+  - name: cfsetospeed
+    standards: 
+      - POSIX
+    return_type: int
+    arguments:
+      - type: struct termios *
+      - type: speed_t
+    guard: null
+    attributes: []
+  - name: tcgetattr
+    standards: 
+      - POSIX
+    return_type: int
+    arguments:
+      - type: int
+      - type: struct termios *
+    guard: null
+    attributes: []
+  - name: tcgetsid
+    standards: 
+      - POSIX
+    return_type: pid_t
+    arguments:
+      - type: int
+    guard: null
+    attributes: []
+  - name: tcdrain
+    standards: 
+      - POSIX
+    return_type: int
+    arguments:
+      - type: int
+    guard: null
+    attributes: []
+  - name: tcflow
+    standards: 
+      - POSIX 
+    return_type: int
+    arguments:
+      - type: int
+      - type: int
+    guard: null
+    attributes: []
+  - name: tcflush
+    standards: 
+      - POSIX
+    return_type: int
+    arguments:
+      - type: int
+      - type: int
+    ...
[truncated]

Copy link
Contributor

@aaryanshukla aaryanshukla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have a newline at the end of each Yaml file. Also we can remove guard and attributes if they are assigned to nothing to cut down on boilerplate info. Rest LGTM.

@michaelrj-google
Copy link
Contributor

The contents of the files look good, but I'm not sure why some of the yaml files' names start with a standard and some don't. Also why are the yaml files in two different folders?

@RoseZhang03
Copy link
Contributor Author

The contents of the files look good, but I'm not sure why some of the yaml files' names start with a standard and some don't. Also why are the yaml files in two different folders?

Good point. I will move the other combined files into the general yaml folder in my next patch. They were originally placed in different folders for organizational purposes as we were combining functions from different standards. Most of these are header files with functions in only one standard.

Copy link
Contributor

@michaelrj-google michaelrj-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I agree that moving the other yaml files would be a good followup patch

@RoseZhang03 RoseZhang03 merged commit 371e924 into llvm:main Jun 28, 2024
4 of 5 checks passed
@RoseZhang03 RoseZhang03 deleted the rosezhang8 branch July 2, 2024 17:47
lravenclaw pushed a commit to lravenclaw/llvm-project that referenced this pull request Jul 3, 2024
Added yaml files containing functions from only one standard.
Also added one combined standard yaml file (errno.yaml).
assert.yaml is still work in progress.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants