This commit is contained in:
2026-07-20 01:53:04 +02:00
commit e71245c082
149 changed files with 8571 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
// SPDX-License-Identifier: GPL-2.0
#ifndef __ZINNIA_UAPI_ARCHCTL_H
#define __ZINNIA_UAPI_ARCHCTL_H
#ifdef __x86_64__
#define __ARCHCTL_SET_FSBASE 1
#define __ARCHCTL_SET_GSBASE 2
#endif
#endif
+39
View File
@@ -0,0 +1,39 @@
// SPDX-License-Identifier: GPL-2.0
#ifndef __ZINNIA_UAPI_EPOLL_H
#define __ZINNIA_UAPI_EPOLL_H
#include <stdint.h>
#define __EPOLLIN (1 << 0)
#define __EPOLLOUT (1 << 1)
#define __EPOLLPRI (1 << 2)
#define __EPOLLHUP (1 << 3)
#define __EPOLLERR (1 << 4)
#define __EPOLLRDHUP (1 << 5)
#define __EPOLLMSG (1 << 6)
#define __EPOLLRDNORM (1 << 7)
#define __EPOLLRDBAND (1 << 8)
#define __EPOLLWRNORM (1 << 9)
#define __EPOLLWRBAND (1 << 10)
#define __EPOLLEXCLUSIVE (1 << 11)
#define __EPOLLWAKEUP (1 << 12)
#define __EPOLLONESHOT (1 << 13)
#define __EPOLLET (1 << 14)
#define __EPOLL_CTL_ADD 1
#define __EPOLL_CTL_DEL 2
#define __EPOLL_CTL_MOD 3
union epoll_data {
void* ptr;
int fd;
uint32_t u32;
uint64_t u64;
};
struct epoll_event {
uint32_t events;
union epoll_data data;
};
#endif
+140
View File
@@ -0,0 +1,140 @@
// SPDX-License-Identifier: GPL-2.0
#ifndef __ZINNIA_UAPI_ERRNO_H
#define __ZINNIA_UAPI_ERRNO_H
#define __EPERM 1
#define __ENOENT 2
#define __ESRCH 3
#define __EINTR 4
#define __EIO 5
#define __ENXIO 6
#define __E2BIG 7
#define __ENOEXEC 8
#define __EBADF 9
#define __ECHILD 10
#define __EAGAIN 11
#define __ENOMEM 12
#define __EACCES 13
#define __EFAULT 14
#define __ENOTBLK 15
#define __EBUSY 16
#define __EEXIST 17
#define __EXDEV 18
#define __ENODEV 19
#define __ENOTDIR 20
#define __EISDIR 21
#define __EINVAL 22
#define __ENFILE 23
#define __EMFILE 24
#define __ENOTTY 25
#define __ETXTBSY 26
#define __EFBIG 27
#define __ENOSPC 28
#define __ESPIPE 29
#define __EROFS 30
#define __EMLINK 31
#define __EPIPE 32
#define __EDOM 33
#define __ERANGE 34
#define __EDEADLK 35
#define __ENAMETOOLONG 36
#define __ENOLCK 37
#define __ENOSYS 38
#define __ENOTEMPTY 39
#define __ELOOP 40
#define __EWOULDBLOCK __EAGAIN
#define __ENOMSG 42
#define __EIDRM 43
#define __ECHRNG 44
#define __EL2NSYNC 45
#define __EL3HLT 46
#define __EL3RST 47
#define __ELNRNG 48
#define __EUNATCH 49
#define __ENOCSI 50
#define __EL2HLT 51
#define __EBADE 52
#define __EBADR 53
#define __EXFULL 54
#define __ENOANO 55
#define __EBADRQC 56
#define __EBADSLT 57
#define __EDEADLOCK __EDEADLK
#define __EBFONT 59
#define __ENOSTR 60
#define __ENODATA 61
#define __ETIME 62
#define __ENOSR 63
#define __ENONET 64
#define __ENOPKG 65
#define __EREMOTE 66
#define __ENOLINK 67
#define __EADV 68
#define __ESRMNT 69
#define __ECOMM 70
#define __EPROTO 71
#define __EMULTIHOP 72
#define __EDOTDOT 73
#define __EBADMSG 74
#define __EOVERFLOW 75
#define __ENOTUNIQ 76
#define __EBADFD 77
#define __EREMCHG 78
#define __ELIBACC 79
#define __ELIBBAD 80
#define __ELIBSCN 81
#define __ELIBMAX 82
#define __ELIBEXEC 83
#define __EILSEQ 84
#define __ERESTART 85
#define __ESTRPIPE 86
#define __EUSERS 87
#define __ENOTSOCK 88
#define __EDESTADDRREQ 89
#define __EMSGSIZE 90
#define __EPROTOTYPE 91
#define __ENOPROTOOPT 92
#define __EPROTONOSUPPORT 93
#define __ESOCKTNOSUPPORT 94
#define __EOPNOTSUPP 95
#define __ENOTSUP __EOPNOTSUPP
#define __EPFNOSUPPORT 96
#define __EAFNOSUPPORT 97
#define __EADDRINUSE 98
#define __EADDRNOTAVAIL 99
#define __ENETDOWN 100
#define __ENETUNREACH 101
#define __ENETRESET 102
#define __ECONNABORTED 103
#define __ECONNRESET 104
#define __ENOBUFS 105
#define __EISCONN 106
#define __ENOTCONN 107
#define __ESHUTDOWN 108
#define __ETOOMANYREFS 109
#define __ETIMEDOUT 110
#define __ECONNREFUSED 111
#define __EHOSTDOWN 112
#define __EHOSTUNREACH 113
#define __EALREADY 114
#define __EINPROGRESS 115
#define __ESTALE 116
#define __EUCLEAN 117
#define __ENOTNAM 118
#define __ENAVAIL 119
#define __EISNAM 120
#define __EREMOTEIO 121
#define __EDQUOT 122
#define __ENOMEDIUM 123
#define __EMEDIUMTYPE 124
#define __ECANCELED 125
#define __ENOKEY 126
#define __EKEYEXPIRED 127
#define __EKEYREVOKED 128
#define __EKEYREJECTED 129
#define __EOWNERDEAD 130
#define __ENOTRECOVERABLE 131
#define __ERFKILL 132
#define __EHWPOISON 133
#endif
+43
View File
@@ -0,0 +1,43 @@
// SPDX-License-Identifier: GPL-2.0
#ifndef __ZINNIA_UAPI_FCNTL_H
#define __ZINNIA_UAPI_FCNTL_H
#define __F_OK 0
#define __X_OK 1
#define __W_OK 2
#define __R_OK 4
#define __O_RDONLY (1 << 0)
#define __O_WRONLY (1 << 1)
#define __O_RDWR (__O_RDONLY | __O_WRONLY)
#define __O_CREAT (1 << 6)
#define __O_EXCL (1 << 7)
#define __O_NOCTTY (1 << 8)
#define __O_TRUNC (1 << 9)
#define __O_APPEND (1 << 10)
#define __O_NONBLOCK (1 << 11)
#define __O_DSYNC (1 << 12)
#define __O_ASYNC (1 << 13)
#define __O_DIRECT (1 << 14)
#define __O_LARGEFILE (1 << 15)
#define __O_DIRECTORY (1 << 16)
#define __O_NOFOLLOW (1 << 17)
#define __O_NOATIME (1 << 18)
#define __O_CLOEXEC (1 << 19)
#define __O_PATH (1 << 21)
#define __O_TMPFILE (1 << 22)
#define __O_SYNC (__O_DIRECTORY | __O_TMPFILE)
#define __O_RSYNC (__O_SYNC)
#define __O_EXEC (__O_PATH)
#define __O_SEARCH (__O_PATH)
#define __O_ACCMODE (__O_RDWR | __O_PATH)
#define __AT_FDCWD (-100)
#define __AT_SYMLINK_NOFOLLOW (1 << 8)
#define __AT_SYMLINK_FOLLOW (1 << 9)
#define __AT_REMOVEDIR (1 << 10)
#define __AT_EACCESS (1 << 11)
#define __AT_EMPTY_PATH (1 << 12)
#endif
+22
View File
@@ -0,0 +1,22 @@
// SPDX-License-Identifier: GPL-2.0
#ifndef __ZINNIA_UAPI_MMAN_H
#define __ZINNIA_UAPI_MMAN_H
#define __PROT_NONE 0x00
#define __PROT_READ 0x01
#define __PROT_WRITE 0x02
#define __PROT_EXEC 0x04
#define __MAP_FAILED ((void*)-1)
#define __MAP_FILE 0x00
#define __MAP_SHARED 0x01
#define __MAP_PRIVATE 0x02
#define __MAP_FIXED 0x10
#define __MAP_ANON 0x20
#define __MAP_ANONYMOUS 0x20
#define __MS_ASYNC 0x1
#define __MS_INVALIDATE 0x2
#define __MS_SYNC 0x4
#endif
+13
View File
@@ -0,0 +1,13 @@
// SPDX-License-Identifier: GPL-2.0
#ifndef __ZINNIA_UAPI_MOUNT_H
#define __ZINNIA_UAPI_MOUNT_H
#define __MNT_RDONLY (1 << 0)
#define __MNT_NOSUID (1 << 1)
#define __MNT_NOEXEC (1 << 2)
#define __MNT_RELATIME (1 << 3)
#define __MNT_NOATIME (1 << 4)
#define __MNT_REMOUNT (1 << 5)
#define __MNT_FORCE (1 << 6)
#endif
+27
View File
@@ -0,0 +1,27 @@
// SPDX-License-Identifier: GPL-2.0
#ifndef __ZINNIA_UAPI_POLL_H
#define __ZINNIA_UAPI_POLL_H
#include <stdint.h>
#define __POLLIN 0x01
#define __POLLOUT 0x02
#define __POLLPRI 0x04
#define __POLLHUP 0x08
#define __POLLERR 0x10
#define __POLLRDHUP 0x20
#define __POLLNVAL 0x40
#define __POLLRDNORM 0x80
#define __POLLRDBAND 0x100
#define __POLLWRNORM 0x200
#define __POLLWRBAND 0x400
typedef intptr_t nfds_t;
struct pollfd {
int fd;
int16_t events;
int16_t revents;
};
#endif
+51
View File
@@ -0,0 +1,51 @@
// SPDX-License-Identifier: GPL-2.0
#ifndef __ZINNIA_UAPI_STAT_H
#define __ZINNIA_UAPI_STAT_H
#include <uapi/time.h>
#include <uapi/types.h>
#define __S_IFMT 0x0F000
#define __S_IFBLK 0x06000
#define __S_IFCHR 0x02000
#define __S_IFIFO 0x01000
#define __S_IFREG 0x08000
#define __S_IFDIR 0x04000
#define __S_IFLNK 0x0A000
#define __S_IFSOCK 0x0C000
#define __S_IRWXU 0700
#define __S_IRUSR 0400
#define __S_IWUSR 0200
#define __S_IXUSR 0100
#define __S_IRWXG 070
#define __S_IRGRP 040
#define __S_IWGRP 020
#define __S_IXGRP 010
#define __S_IRWXO 07
#define __S_IROTH 04
#define __S_IWOTH 02
#define __S_IXOTH 01
#define __S_ISUID 04000
#define __S_ISGID 02000
#define __S_ISVTX 01000
#define __S_IREAD __S_IRUSR
#define __S_IWRITE __S_IWUSR
#define __S_IEXEC __S_IXUSR
struct stat {
dev_t st_dev;
ino_t st_ino;
mode_t st_mode;
nlink_t st_nlink;
uid_t st_uid;
gid_t st_gid;
dev_t st_rdev;
off_t st_size;
struct timespec st_atim;
struct timespec st_mtim;
struct timespec st_ctim;
blksize_t st_blksize;
blkcnt_t st_blocks;
};
#endif
+151
View File
@@ -0,0 +1,151 @@
// SPDX-License-Identifier: GPL-2.0
#ifndef __ZINNIA_UAPI_SYSCALL_NUMBERS_H
#define __ZINNIA_UAPI_SYSCALL_NUMBERS_H
#define __SYS_exit 0
#define __SYS_syslog 1
#define __SYS_getuname 2
#define __SYS_setuname 3
#define __SYS_archctl 4
#define __SYS_reboot 5
#define __SYS_mmap 6
#define __SYS_munmap 7
#define __SYS_mprotect 8
#define __SYS_madvise 9
#define __SYS_sigprocmask 10
#define __SYS_sigsuspend 11
#define __SYS_sigpending 12
#define __SYS_sigaction 13
#define __SYS_sigtimedwait 14
#define __SYS_sigaltstack 15
#define __SYS_sigreturn 16
#define __SYS_sigqueue 17
#define __SYS_execve 18
#define __SYS_fexecve 19
#define __SYS_fork 20
#define __SYS_kill 21
#define __SYS_gettid 22
#define __SYS_getpid 23
#define __SYS_getppid 24
#define __SYS_waitid 25
#define __SYS_waitpid 26
#define __SYS_pread 27
#define __SYS_readv 28
#define __SYS_pwrite 29
#define __SYS_writev 30
#define __SYS_seek 31
#define __SYS_ioctl 32
#define __SYS_openat 33
#define __SYS_close 34
#define __SYS_fstat 35
#define __SYS_fstatat 36
#define __SYS_statvfs 37
#define __SYS_fstatvfs 38
#define __SYS_faccessat 39
#define __SYS_fcntl 40
#define __SYS_ftruncate 41
#define __SYS_truncate 42
#define __SYS_fallocate 43
#define __SYS_fadvise 44
#define __SYS_utimensat 45
#define __SYS_mknodat 46
#define __SYS_getcwd 47
#define __SYS_chdir 48
#define __SYS_fchdir 49
#define __SYS_mkdirat 50
#define __SYS_rmdirat 51
#define __SYS_getdents 52
#define __SYS_renameat 53
#define __SYS_fchmod 54
#define __SYS_fchmodat 55
#define __SYS_fchownat 56
#define __SYS_linkat 57
#define __SYS_symlinkat 58
#define __SYS_unlinkat 59
#define __SYS_readlinkat 60
#define __SYS_flock 61
#define __SYS_ppoll 62
#define __SYS_dup 63
#define __SYS_dup3 64
#define __SYS_sync 65
#define __SYS_fsync 66
#define __SYS_fdatasync 67
#define __SYS_getgroups 68
#define __SYS_setgroups 69
#define __SYS_getsid 70
#define __SYS_setsid 71
#define __SYS_setuid 72
#define __SYS_getuid 73
#define __SYS_setgid 74
#define __SYS_getgid 75
#define __SYS_geteuid 76
#define __SYS_seteuid 77
#define __SYS_getegid 78
#define __SYS_setegid 79
#define __SYS_getpgid 80
#define __SYS_setpgid 81
#define __SYS_getresuid 82
#define __SYS_setresuid 83
#define __SYS_getresgid 84
#define __SYS_setresgid 85
#define __SYS_setreuid 86
#define __SYS_setregid 87
#define __SYS_umask 88
#define __SYS_pipe 89
#define __SYS_futex_wait 90
#define __SYS_futex_wake 91
#define __SYS_thread_create 92
#define __SYS_thread_kill 93
#define __SYS_thread_exit 94
#define __SYS_thread_setname 95
#define __SYS_thread_getname 96
#define __SYS_timer_create 97
#define __SYS_timer_set 98
#define __SYS_timer_get 99
#define __SYS_timer_getoverrun 100
#define __SYS_timer_delete 101
#define __SYS_itimer_get 102
#define __SYS_itimer_set 103
#define __SYS_clock_get 104
#define __SYS_clock_getres 105
#define __SYS_clock_set 106
#define __SYS_sleep 107
#define __SYS_yield 108
#define __SYS_chroot 109
#define __SYS_mount 110
#define __SYS_umount 111
#define __SYS_socket 112
#define __SYS_socketpair 113
#define __SYS_shutdown 114
#define __SYS_bind 115
#define __SYS_connect 116
#define __SYS_accept 117
#define __SYS_listen 118
#define __SYS_getpeername 119
#define __SYS_getsockname 120
#define __SYS_getsockopt 121
#define __SYS_setsockopt 122
#define __SYS_sendmsg 123
#define __SYS_recvmsg 124
#define __SYS_getentropy 125
#define __SYS_getrusage 126
#define __SYS_getrlimit 127
#define __SYS_setrlimit 128
#define __SYS_getpriority 129
#define __SYS_setpriority 130
#define __SYS_sched_getparam 131
#define __SYS_sched_setparam 132
#define __SYS_module_insert 133
#define __SYS_module_remove 134
#define __SYS_epoll_create 135
#define __SYS_epoll_ctl 136
#define __SYS_epoll_pwait 137
#define __SYS_timerfd_create 138
#define __SYS_timerfd_gettime 139
#define __SYS_timerfd_settime 140
#define __SYS_signalfd_create 141
#define __SYS_eventfd_create 142
#define __SYS_msync 143
#define __SYS_sysconf 144
#endif
+47
View File
@@ -0,0 +1,47 @@
// SPDX-License-Identifier: GPL-2.0
#ifndef __ZINNIA_UAPI_TIME_H
#define __ZINNIA_UAPI_TIME_H
#include <stdint.h>
typedef int64_t time_t;
typedef int64_t suseconds_t;
struct timespec {
time_t tv_sec;
int64_t tv_nsec;
};
struct timeval {
time_t tv_sec;
suseconds_t tv_usec;
};
struct itimerval {
struct timeval it_interval;
struct timeval it_value;
};
struct itimerspec {
struct timespec it_interval;
struct timespec it_value;
};
#define __ITIMER_REAL 0
#define __ITIMER_VIRTUAL 1
#define __ITIMER_PROF 2
#define __CLOCK_REALTIME 0
#define __CLOCK_MONOTONIC 1
#define __CLOCK_PROCESS_CPUTIME_ID 2
#define __CLOCK_THREAD_CPUTIME_ID 3
#define __CLOCK_MONOTONIC_RAW 4
#define __CLOCK_REALTIME_COARSE 5
#define __CLOCK_MONOTONIC_COARSE 6
#define __CLOCK_BOOTTIME 7
#define __TFD_CLOEXEC __O_CLOEXEC
#define __TFD_NONBLOCK __O_NONBLOCK
#define __TFD_TIMER_ABSTIME 1
#endif
+24
View File
@@ -0,0 +1,24 @@
// SPDX-License-Identifier: GPL-2.0
#ifndef __ZINNIA_UAPI_TYPES_H
#define __ZINNIA_UAPI_TYPES_H
#include <stdint.h>
typedef int64_t off_t;
typedef off_t off64_t;
typedef uintptr_t blksize_t;
typedef uintptr_t blkcnt_t;
typedef uintptr_t clockid_t;
typedef uintptr_t dev_t;
typedef uint32_t gid_t;
typedef uintptr_t ino_t;
typedef uint32_t mode_t;
typedef uintptr_t nlink_t;
typedef int32_t pid_t;
typedef uintptr_t rlim_t;
typedef uint32_t uid_t;
typedef uintptr_t fsblkcnt_t;
typedef uintptr_t fsfilcnt_t;
typedef uintptr_t pthread_attr_t;
#endif
+12
View File
@@ -0,0 +1,12 @@
// SPDX-License-Identifier: GPL-2.0
#ifndef __ZINNIA_UAPI_UIO_H
#define __ZINNIA_UAPI_UIO_H
#include <stddef.h>
struct iovec {
void* base;
size_t len;
};
#endif
+14
View File
@@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0
#ifndef __ZINNIA_UAPI_UTSNAME_H
#define __ZINNIA_UAPI_UTSNAME_H
struct utsname {
char sysname[65];
char nodename[65];
char release[65];
char version[65];
char machine[65];
char domainname[65];
};
#endif