unix: add generate component files support for linux/loong64
Updates golang/go#46229
Change-Id: If0ee99997360608d7ba218880a1ef180ca6db551
Reviewed-on: https://go-review.googlesource.com/c/sys/+/399336
Reviewed-by: Matt Layher <mdlayher@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
limeidan authored 2 years ago
Gopher Robot committed 2 years ago
18 | 18 | RUN git clone --branch v5.17 --depth 1 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux |
19 | 19 | # GNU C library: Released 03 Feb 2022 |
20 | 20 | RUN git clone --branch release/2.35/master --depth 1 https://sourceware.org/git/glibc.git |
21 | ||
22 | # Only for loong64, add kernel and glibc patch | |
23 | RUN git clone https://github.com/loongson/golang-infra.git /git/loong64-patches \ | |
24 | && git config --global user.name "golang" && git config --global user.email "golang@localhost" \ | |
25 | && cd /git/loong64-patches && git checkout linux-v5.17 && cd /git/linux && git am /git/loong64-patches/*.patch \ | |
26 | && cd /git/loong64-patches && git checkout glibc-v2.35 && cd /git/glibc && git am /git/loong64-patches/*.patch \ | |
27 | && curl -fsSL https://git.savannah.gnu.org/cgit/config.git/plain/config.sub -o /git/glibc/scripts/config.sub | |
21 | 28 | |
22 | 29 | # Get Go |
23 | 30 | ENV GOLANG_VERSION 1.18 |
50 | 57 | && apt-get clean \ |
51 | 58 | && rm -rf /var/lib/apt/lists/* |
52 | 59 | |
60 | # Only for loong64, add patch and build golang | |
61 | RUN git clone https://go.googlesource.com/go --branch go1.18 /git/go \ | |
62 | && cd /git/loong64-patches && git checkout go-v1.18 && cd /git/go && git am /git/loong64-patches/*.patch \ | |
63 | && rm -rf /git/loong64-patches && cd /git/go/src && ./make.bash | |
64 | ||
65 | ENV PATH /git/go/bin:$PATH | |
66 | ||
67 | # Only for loong64, getting tools of qemu-user and gcc-cross-compiler | |
68 | RUN apt-get update && apt-get install wget xz-utils -y && mkdir /loong64 && cd /loong64 \ | |
69 | && wget -q https://github.com/loongson/build-tools/releases/download/2021.12.21/qemu-loongarch-2022-4-01.tar.gz \ | |
70 | && tar xf qemu-loongarch-2022-4-01.tar.gz && cp ./4-1/new-world/qemu-loongarch64 /usr/bin/ \ | |
71 | && rm -rf qemu-loongarch-2022-4-01.tar.gz 4-1 \ | |
72 | && wget -q https://github.com/loongson/build-tools/releases/download/2021.12.21/loongarch64-clfs-2022-03-03-cross-tools-gcc-glibc.tar.xz \ | |
73 | && tar xf loongarch64-clfs-2022-03-03-cross-tools-gcc-glibc.tar.xz && mv cross-tools.gcc_glibc /usr/local/cross-tools-loong64 \ | |
74 | && rm -rf loongarch64-clfs-2022-03-03-cross-tools-gcc-glibc.tar.xz \ | |
75 | && ln -s /usr/local/cross-tools-loong64/bin/loongarch64-unknown-linux-gnu-gcc /usr/bin/loongarch64-linux-gnu-gcc \ | |
76 | && rm -rf /loong64 | |
77 | ||
53 | 78 | # Let the scripts know they are in the docker environment |
54 | 79 | ENV GOLANG_SYS_BUILD docker |
55 | 80 | WORKDIR /build/unix |
81 | 81 | LinuxArch: "arm", |
82 | 82 | GNUArch: "arm-linux-gnueabi", |
83 | 83 | Bits: 32, |
84 | }, | |
85 | { | |
86 | GoArch: "loong64", | |
87 | LinuxArch: "loongarch", | |
88 | GNUArch: "loongarch64-linux-gnu", | |
89 | Bits: 64, | |
84 | 90 | }, |
85 | 91 | { |
86 | 92 | GoArch: "mips", |
307 | 307 | |
308 | 308 | #ifdef __ARM_EABI__ |
309 | 309 | typedef struct user_regs PtraceRegs; |
310 | #elif defined(__aarch64__) | |
310 | #elif defined(__aarch64__) || defined(__loongarch64) | |
311 | 311 | typedef struct user_pt_regs PtraceRegs; |
312 | 312 | #elif defined(__mips__) || defined(__powerpc__) || defined(__powerpc64__) |
313 | 313 | typedef struct pt_regs PtraceRegs; |
338 | 338 | // alignment requirements of EABI |
339 | 339 | int32_t padFd; |
340 | 340 | #elif defined(__powerpc__) || defined(__powerpc64__) || defined(__s390x__) || defined(__sparc__) \ |
341 | || defined(__riscv) || (defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI64) | |
341 | || defined(__riscv) || (defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI64) \ | |
342 | || defined(__loongarch64) | |
342 | 343 | int32_t _padFd; |
343 | 344 | #endif |
344 | 345 | int32_t fd; |
0 | // Copyright 2022 The Go Authors. All rights reserved. | |
1 | // Use of this source code is governed by a BSD-style | |
2 | // license that can be found in the LICENSE file. | |
3 | ||
4 | //go:build loong64 && linux | |
5 | // +build loong64,linux | |
6 | ||
7 | package unix | |
8 | ||
9 | import "unsafe" | |
10 | ||
11 | //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT | |
12 | //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64 | |
13 | //sys Fchown(fd int, uid int, gid int) (err error) | |
14 | //sys Fstat(fd int, stat *Stat_t) (err error) | |
15 | //sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) | |
16 | //sys Fstatfs(fd int, buf *Statfs_t) (err error) | |
17 | //sys Ftruncate(fd int, length int64) (err error) | |
18 | //sysnb Getegid() (egid int) | |
19 | //sysnb Geteuid() (euid int) | |
20 | //sysnb Getgid() (gid int) | |
21 | //sysnb Getuid() (uid int) | |
22 | //sys Listen(s int, n int) (err error) | |
23 | //sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 | |
24 | //sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 | |
25 | //sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK | |
26 | ||
27 | func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { | |
28 | var ts *Timespec | |
29 | if timeout != nil { | |
30 | ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000} | |
31 | } | |
32 | return Pselect(nfd, r, w, e, ts, nil) | |
33 | } | |
34 | ||
35 | //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) | |
36 | //sys setfsgid(gid int) (prev int, err error) | |
37 | //sys setfsuid(uid int) (prev int, err error) | |
38 | //sysnb Setregid(rgid int, egid int) (err error) | |
39 | //sysnb Setresgid(rgid int, egid int, sgid int) (err error) | |
40 | //sysnb Setresuid(ruid int, euid int, suid int) (err error) | |
41 | //sysnb Setreuid(ruid int, euid int) (err error) | |
42 | //sys Shutdown(fd int, how int) (err error) | |
43 | //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) | |
44 | ||
45 | func Stat(path string, stat *Stat_t) (err error) { | |
46 | return Fstatat(AT_FDCWD, path, stat, 0) | |
47 | } | |
48 | ||
49 | func Lchown(path string, uid int, gid int) (err error) { | |
50 | return Fchownat(AT_FDCWD, path, uid, gid, AT_SYMLINK_NOFOLLOW) | |
51 | } | |
52 | ||
53 | func Lstat(path string, stat *Stat_t) (err error) { | |
54 | return Fstatat(AT_FDCWD, path, stat, AT_SYMLINK_NOFOLLOW) | |
55 | } | |
56 | ||
57 | //sys Statfs(path string, buf *Statfs_t) (err error) | |
58 | //sys SyncFileRange(fd int, off int64, n int64, flags int) (err error) | |
59 | //sys Truncate(path string, length int64) (err error) | |
60 | ||
61 | func Ustat(dev int, ubuf *Ustat_t) (err error) { | |
62 | return ENOSYS | |
63 | } | |
64 | ||
65 | //sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) | |
66 | //sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) | |
67 | //sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) | |
68 | //sysnb getgroups(n int, list *_Gid_t) (nn int, err error) | |
69 | //sysnb setgroups(n int, list *_Gid_t) (err error) | |
70 | //sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) | |
71 | //sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) | |
72 | //sysnb socket(domain int, typ int, proto int) (fd int, err error) | |
73 | //sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) | |
74 | //sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) | |
75 | //sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) | |
76 | //sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) | |
77 | //sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) | |
78 | //sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) | |
79 | //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) | |
80 | //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) | |
81 | ||
82 | //sysnb Gettimeofday(tv *Timeval) (err error) | |
83 | ||
84 | func setTimespec(sec, nsec int64) Timespec { | |
85 | return Timespec{Sec: sec, Nsec: nsec} | |
86 | } | |
87 | ||
88 | func setTimeval(sec, usec int64) Timeval { | |
89 | return Timeval{Sec: sec, Usec: usec} | |
90 | } | |
91 | ||
92 | func Getrlimit(resource int, rlim *Rlimit) (err error) { | |
93 | err = Prlimit(0, resource, nil, rlim) | |
94 | return | |
95 | } | |
96 | ||
97 | func Setrlimit(resource int, rlim *Rlimit) (err error) { | |
98 | err = Prlimit(0, resource, rlim, nil) | |
99 | return | |
100 | } | |
101 | ||
102 | func futimesat(dirfd int, path string, tv *[2]Timeval) (err error) { | |
103 | if tv == nil { | |
104 | return utimensat(dirfd, path, nil, 0) | |
105 | } | |
106 | ||
107 | ts := []Timespec{ | |
108 | NsecToTimespec(TimevalToNsec(tv[0])), | |
109 | NsecToTimespec(TimevalToNsec(tv[1])), | |
110 | } | |
111 | return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0) | |
112 | } | |
113 | ||
114 | func Time(t *Time_t) (Time_t, error) { | |
115 | var tv Timeval | |
116 | err := Gettimeofday(&tv) | |
117 | if err != nil { | |
118 | return 0, err | |
119 | } | |
120 | if t != nil { | |
121 | *t = Time_t(tv.Sec) | |
122 | } | |
123 | return Time_t(tv.Sec), nil | |
124 | } | |
125 | ||
126 | func Utime(path string, buf *Utimbuf) error { | |
127 | tv := []Timeval{ | |
128 | {Sec: buf.Actime}, | |
129 | {Sec: buf.Modtime}, | |
130 | } | |
131 | return Utimes(path, tv) | |
132 | } | |
133 | ||
134 | func utimes(path string, tv *[2]Timeval) (err error) { | |
135 | if tv == nil { | |
136 | return utimensat(AT_FDCWD, path, nil, 0) | |
137 | } | |
138 | ||
139 | ts := []Timespec{ | |
140 | NsecToTimespec(TimevalToNsec(tv[0])), | |
141 | NsecToTimespec(TimevalToNsec(tv[1])), | |
142 | } | |
143 | return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0) | |
144 | } | |
145 | ||
146 | func (r *PtraceRegs) PC() uint64 { return r.Era } | |
147 | ||
148 | func (r *PtraceRegs) SetPC(era uint64) { r.Era = era } | |
149 | ||
150 | func (iov *Iovec) SetLen(length int) { | |
151 | iov.Len = uint64(length) | |
152 | } | |
153 | ||
154 | func (msghdr *Msghdr) SetControllen(length int) { | |
155 | msghdr.Controllen = uint64(length) | |
156 | } | |
157 | ||
158 | func (msghdr *Msghdr) SetIovlen(length int) { | |
159 | msghdr.Iovlen = uint64(length) | |
160 | } | |
161 | ||
162 | func (cmsg *Cmsghdr) SetLen(length int) { | |
163 | cmsg.Len = uint64(length) | |
164 | } | |
165 | ||
166 | func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) { | |
167 | rsa.Service_name_len = uint64(length) | |
168 | } | |
169 | ||
170 | func Pause() error { | |
171 | _, err := ppoll(nil, 0, nil, nil) | |
172 | return err | |
173 | } | |
174 | ||
175 | func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { | |
176 | return Renameat2(olddirfd, oldpath, newdirfd, newpath, 0) | |
177 | } | |
178 | ||
179 | //sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) | |
180 | ||
181 | func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error { | |
182 | cmdlineLen := len(cmdline) | |
183 | if cmdlineLen > 0 { | |
184 | // Account for the additional NULL byte added by | |
185 | // BytePtrFromString in kexecFileLoad. The kexec_file_load | |
186 | // syscall expects a NULL-terminated string. | |
187 | cmdlineLen++ | |
188 | } | |
189 | return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags) | |
190 | } |
1309 | 1309 | KEXEC_ARCH_ARM = 0x280000 |
1310 | 1310 | KEXEC_ARCH_DEFAULT = 0x0 |
1311 | 1311 | KEXEC_ARCH_IA_64 = 0x320000 |
1312 | KEXEC_ARCH_LOONGARCH = 0x1020000 | |
1312 | 1313 | KEXEC_ARCH_MASK = 0xffff0000 |
1313 | 1314 | KEXEC_ARCH_MIPS = 0x80000 |
1314 | 1315 | KEXEC_ARCH_MIPS_LE = 0xa0000 |
0 | // mkerrors.sh -Wall -Werror -static -I/tmp/include | |
1 | // Code generated by the command above; see README.md. DO NOT EDIT. | |
2 | ||
3 | //go:build loong64 && linux | |
4 | // +build loong64,linux | |
5 | ||
6 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. | |
7 | // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go | |
8 | ||
9 | package unix | |
10 | ||
11 | import "syscall" | |
12 | ||
13 | const ( | |
14 | B1000000 = 0x1008 | |
15 | B115200 = 0x1002 | |
16 | B1152000 = 0x1009 | |
17 | B1500000 = 0x100a | |
18 | B2000000 = 0x100b | |
19 | B230400 = 0x1003 | |
20 | B2500000 = 0x100c | |
21 | B3000000 = 0x100d | |
22 | B3500000 = 0x100e | |
23 | B4000000 = 0x100f | |
24 | B460800 = 0x1004 | |
25 | B500000 = 0x1005 | |
26 | B57600 = 0x1001 | |
27 | B576000 = 0x1006 | |
28 | B921600 = 0x1007 | |
29 | BLKBSZGET = 0x80081270 | |
30 | BLKBSZSET = 0x40081271 | |
31 | BLKFLSBUF = 0x1261 | |
32 | BLKFRAGET = 0x1265 | |
33 | BLKFRASET = 0x1264 | |
34 | BLKGETSIZE = 0x1260 | |
35 | BLKGETSIZE64 = 0x80081272 | |
36 | BLKPBSZGET = 0x127b | |
37 | BLKRAGET = 0x1263 | |
38 | BLKRASET = 0x1262 | |
39 | BLKROGET = 0x125e | |
40 | BLKROSET = 0x125d | |
41 | BLKRRPART = 0x125f | |
42 | BLKSECTGET = 0x1267 | |
43 | BLKSECTSET = 0x1266 | |
44 | BLKSSZGET = 0x1268 | |
45 | BOTHER = 0x1000 | |
46 | BS1 = 0x2000 | |
47 | BSDLY = 0x2000 | |
48 | CBAUD = 0x100f | |
49 | CBAUDEX = 0x1000 | |
50 | CIBAUD = 0x100f0000 | |
51 | CLOCAL = 0x800 | |
52 | CR1 = 0x200 | |
53 | CR2 = 0x400 | |
54 | CR3 = 0x600 | |
55 | CRDLY = 0x600 | |
56 | CREAD = 0x80 | |
57 | CS6 = 0x10 | |
58 | CS7 = 0x20 | |
59 | CS8 = 0x30 | |
60 | CSIZE = 0x30 | |
61 | CSTOPB = 0x40 | |
62 | ECCGETLAYOUT = 0x81484d11 | |
63 | ECCGETSTATS = 0x80104d12 | |
64 | ECHOCTL = 0x200 | |
65 | ECHOE = 0x10 | |
66 | ECHOK = 0x20 | |
67 | ECHOKE = 0x800 | |
68 | ECHONL = 0x40 | |
69 | ECHOPRT = 0x400 | |
70 | EFD_CLOEXEC = 0x80000 | |
71 | EFD_NONBLOCK = 0x800 | |
72 | EPOLL_CLOEXEC = 0x80000 | |
73 | EXTPROC = 0x10000 | |
74 | FF1 = 0x8000 | |
75 | FFDLY = 0x8000 | |
76 | FICLONE = 0x40049409 | |
77 | FICLONERANGE = 0x4020940d | |
78 | FLUSHO = 0x1000 | |
79 | FPU_CTX_MAGIC = 0x46505501 | |
80 | FS_IOC_ENABLE_VERITY = 0x40806685 | |
81 | FS_IOC_GETFLAGS = 0x80086601 | |
82 | FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b | |
83 | FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 | |
84 | FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 | |
85 | FS_IOC_SETFLAGS = 0x40086602 | |
86 | FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 | |
87 | F_GETLK = 0x5 | |
88 | F_GETLK64 = 0x5 | |
89 | F_GETOWN = 0x9 | |
90 | F_RDLCK = 0x0 | |
91 | F_SETLK = 0x6 | |
92 | F_SETLK64 = 0x6 | |
93 | F_SETLKW = 0x7 | |
94 | F_SETLKW64 = 0x7 | |
95 | F_SETOWN = 0x8 | |
96 | F_UNLCK = 0x2 | |
97 | F_WRLCK = 0x1 | |
98 | HIDIOCGRAWINFO = 0x80084803 | |
99 | HIDIOCGRDESC = 0x90044802 | |
100 | HIDIOCGRDESCSIZE = 0x80044801 | |
101 | HUPCL = 0x400 | |
102 | ICANON = 0x2 | |
103 | IEXTEN = 0x8000 | |
104 | IN_CLOEXEC = 0x80000 | |
105 | IN_NONBLOCK = 0x800 | |
106 | IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 | |
107 | ISIG = 0x1 | |
108 | IUCLC = 0x200 | |
109 | IXOFF = 0x1000 | |
110 | IXON = 0x400 | |
111 | LASX_CTX_MAGIC = 0x41535801 | |
112 | LSX_CTX_MAGIC = 0x53580001 | |
113 | MAP_ANON = 0x20 | |
114 | MAP_ANONYMOUS = 0x20 | |
115 | MAP_DENYWRITE = 0x800 | |
116 | MAP_EXECUTABLE = 0x1000 | |
117 | MAP_GROWSDOWN = 0x100 | |
118 | MAP_HUGETLB = 0x40000 | |
119 | MAP_LOCKED = 0x2000 | |
120 | MAP_NONBLOCK = 0x10000 | |
121 | MAP_NORESERVE = 0x4000 | |
122 | MAP_POPULATE = 0x8000 | |
123 | MAP_STACK = 0x20000 | |
124 | MAP_SYNC = 0x80000 | |
125 | MCL_CURRENT = 0x1 | |
126 | MCL_FUTURE = 0x2 | |
127 | MCL_ONFAULT = 0x4 | |
128 | MEMERASE = 0x40084d02 | |
129 | MEMERASE64 = 0x40104d14 | |
130 | MEMGETBADBLOCK = 0x40084d0b | |
131 | MEMGETINFO = 0x80204d01 | |
132 | MEMGETOOBSEL = 0x80c84d0a | |
133 | MEMGETREGIONCOUNT = 0x80044d07 | |
134 | MEMISLOCKED = 0x80084d17 | |
135 | MEMLOCK = 0x40084d05 | |
136 | MEMREADOOB = 0xc0104d04 | |
137 | MEMSETBADBLOCK = 0x40084d0c | |
138 | MEMUNLOCK = 0x40084d06 | |
139 | MEMWRITEOOB = 0xc0104d03 | |
140 | MTDFILEMODE = 0x4d13 | |
141 | NFDBITS = 0x40 | |
142 | NLDLY = 0x100 | |
143 | NOFLSH = 0x80 | |
144 | NS_GET_NSTYPE = 0xb703 | |
145 | NS_GET_OWNER_UID = 0xb704 | |
146 | NS_GET_PARENT = 0xb702 | |
147 | NS_GET_USERNS = 0xb701 | |
148 | OLCUC = 0x2 | |
149 | ONLCR = 0x4 | |
150 | OTPERASE = 0x400c4d19 | |
151 | OTPGETREGIONCOUNT = 0x40044d0e | |
152 | OTPGETREGIONINFO = 0x400c4d0f | |
153 | OTPLOCK = 0x800c4d10 | |
154 | OTPSELECT = 0x80044d0d | |
155 | O_APPEND = 0x400 | |
156 | O_ASYNC = 0x2000 | |
157 | O_CLOEXEC = 0x80000 | |
158 | O_CREAT = 0x40 | |
159 | O_DIRECT = 0x4000 | |
160 | O_DIRECTORY = 0x10000 | |
161 | O_DSYNC = 0x1000 | |
162 | O_EXCL = 0x80 | |
163 | O_FSYNC = 0x101000 | |
164 | O_LARGEFILE = 0x0 | |
165 | O_NDELAY = 0x800 | |
166 | O_NOATIME = 0x40000 | |
167 | O_NOCTTY = 0x100 | |
168 | O_NOFOLLOW = 0x20000 | |
169 | O_NONBLOCK = 0x800 | |
170 | O_PATH = 0x200000 | |
171 | O_RSYNC = 0x101000 | |
172 | O_SYNC = 0x101000 | |
173 | O_TMPFILE = 0x410000 | |
174 | O_TRUNC = 0x200 | |
175 | PARENB = 0x100 | |
176 | PARODD = 0x200 | |
177 | PENDIN = 0x4000 | |
178 | PERF_EVENT_IOC_DISABLE = 0x2401 | |
179 | PERF_EVENT_IOC_ENABLE = 0x2400 | |
180 | PERF_EVENT_IOC_ID = 0x80082407 | |
181 | PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b | |
182 | PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409 | |
183 | PERF_EVENT_IOC_PERIOD = 0x40082404 | |
184 | PERF_EVENT_IOC_QUERY_BPF = 0xc008240a | |
185 | PERF_EVENT_IOC_REFRESH = 0x2402 | |
186 | PERF_EVENT_IOC_RESET = 0x2403 | |
187 | PERF_EVENT_IOC_SET_BPF = 0x40042408 | |
188 | PERF_EVENT_IOC_SET_FILTER = 0x40082406 | |
189 | PERF_EVENT_IOC_SET_OUTPUT = 0x2405 | |
190 | PPPIOCATTACH = 0x4004743d | |
191 | PPPIOCATTCHAN = 0x40047438 | |
192 | PPPIOCBRIDGECHAN = 0x40047435 | |
193 | PPPIOCCONNECT = 0x4004743a | |
194 | PPPIOCDETACH = 0x4004743c | |
195 | PPPIOCDISCONN = 0x7439 | |
196 | PPPIOCGASYNCMAP = 0x80047458 | |
197 | PPPIOCGCHAN = 0x80047437 | |
198 | PPPIOCGDEBUG = 0x80047441 | |
199 | PPPIOCGFLAGS = 0x8004745a | |
200 | PPPIOCGIDLE = 0x8010743f | |
201 | PPPIOCGIDLE32 = 0x8008743f | |
202 | PPPIOCGIDLE64 = 0x8010743f | |
203 | PPPIOCGL2TPSTATS = 0x80487436 | |
204 | PPPIOCGMRU = 0x80047453 | |
205 | PPPIOCGRASYNCMAP = 0x80047455 | |
206 | PPPIOCGUNIT = 0x80047456 | |
207 | PPPIOCGXASYNCMAP = 0x80207450 | |
208 | PPPIOCSACTIVE = 0x40107446 | |
209 | PPPIOCSASYNCMAP = 0x40047457 | |
210 | PPPIOCSCOMPRESS = 0x4010744d | |
211 | PPPIOCSDEBUG = 0x40047440 | |
212 | PPPIOCSFLAGS = 0x40047459 | |
213 | PPPIOCSMAXCID = 0x40047451 | |
214 | PPPIOCSMRRU = 0x4004743b | |
215 | PPPIOCSMRU = 0x40047452 | |
216 | PPPIOCSNPMODE = 0x4008744b | |
217 | PPPIOCSPASS = 0x40107447 | |
218 | PPPIOCSRASYNCMAP = 0x40047454 | |
219 | PPPIOCSXASYNCMAP = 0x4020744f | |
220 | PPPIOCUNBRIDGECHAN = 0x7434 | |
221 | PPPIOCXFERUNIT = 0x744e | |
222 | PR_SET_PTRACER_ANY = 0xffffffffffffffff | |
223 | PTRACE_SYSEMU = 0x1f | |
224 | PTRACE_SYSEMU_SINGLESTEP = 0x20 | |
225 | RLIMIT_AS = 0x9 | |
226 | RLIMIT_MEMLOCK = 0x8 | |
227 | RLIMIT_NOFILE = 0x7 | |
228 | RLIMIT_NPROC = 0x6 | |
229 | RLIMIT_RSS = 0x5 | |
230 | RNDADDENTROPY = 0x40085203 | |
231 | RNDADDTOENTCNT = 0x40045201 | |
232 | RNDCLEARPOOL = 0x5206 | |
233 | RNDGETENTCNT = 0x80045200 | |
234 | RNDGETPOOL = 0x80085202 | |
235 | RNDRESEEDCRNG = 0x5207 | |
236 | RNDZAPENTCNT = 0x5204 | |
237 | RTC_AIE_OFF = 0x7002 | |
238 | RTC_AIE_ON = 0x7001 | |
239 | RTC_ALM_READ = 0x80247008 | |
240 | RTC_ALM_SET = 0x40247007 | |
241 | RTC_EPOCH_READ = 0x8008700d | |
242 | RTC_EPOCH_SET = 0x4008700e | |
243 | RTC_IRQP_READ = 0x8008700b | |
244 | RTC_IRQP_SET = 0x4008700c | |
245 | RTC_PARAM_GET = 0x40187013 | |
246 | RTC_PARAM_SET = 0x40187014 | |
247 | RTC_PIE_OFF = 0x7006 | |
248 | RTC_PIE_ON = 0x7005 | |
249 | RTC_PLL_GET = 0x80207011 | |
250 | RTC_PLL_SET = 0x40207012 | |
251 | RTC_RD_TIME = 0x80247009 | |
252 | RTC_SET_TIME = 0x4024700a | |
253 | RTC_UIE_OFF = 0x7004 | |
254 | RTC_UIE_ON = 0x7003 | |
255 | RTC_VL_CLR = 0x7014 | |
256 | RTC_VL_READ = 0x80047013 | |
257 | RTC_WIE_OFF = 0x7010 | |
258 | RTC_WIE_ON = 0x700f | |
259 | RTC_WKALM_RD = 0x80287010 | |
260 | RTC_WKALM_SET = 0x4028700f | |
261 | SCM_TIMESTAMPING = 0x25 | |
262 | SCM_TIMESTAMPING_OPT_STATS = 0x36 | |
263 | SCM_TIMESTAMPING_PKTINFO = 0x3a | |
264 | SCM_TIMESTAMPNS = 0x23 | |
265 | SCM_TXTIME = 0x3d | |
266 | SCM_WIFI_STATUS = 0x29 | |
267 | SFD_CLOEXEC = 0x80000 | |
268 | SFD_NONBLOCK = 0x800 | |
269 | SIOCATMARK = 0x8905 | |
270 | SIOCGPGRP = 0x8904 | |
271 | SIOCGSTAMPNS_NEW = 0x80108907 | |
272 | SIOCGSTAMP_NEW = 0x80108906 | |
273 | SIOCINQ = 0x541b | |
274 | SIOCOUTQ = 0x5411 | |
275 | SIOCSPGRP = 0x8902 | |
276 | SOCK_CLOEXEC = 0x80000 | |
277 | SOCK_DGRAM = 0x2 | |
278 | SOCK_NONBLOCK = 0x800 | |
279 | SOCK_STREAM = 0x1 | |
280 | SOL_SOCKET = 0x1 | |
281 | SO_ACCEPTCONN = 0x1e | |
282 | SO_ATTACH_BPF = 0x32 | |
283 | SO_ATTACH_REUSEPORT_CBPF = 0x33 | |
284 | SO_ATTACH_REUSEPORT_EBPF = 0x34 | |
285 | SO_BINDTODEVICE = 0x19 | |
286 | SO_BINDTOIFINDEX = 0x3e | |
287 | SO_BPF_EXTENSIONS = 0x30 | |
288 | SO_BROADCAST = 0x6 | |
289 | SO_BSDCOMPAT = 0xe | |
290 | SO_BUF_LOCK = 0x48 | |
291 | SO_BUSY_POLL = 0x2e | |
292 | SO_BUSY_POLL_BUDGET = 0x46 | |
293 | SO_CNX_ADVICE = 0x35 | |
294 | SO_COOKIE = 0x39 | |
295 | SO_DETACH_REUSEPORT_BPF = 0x44 | |
296 | SO_DOMAIN = 0x27 | |
297 | SO_DONTROUTE = 0x5 | |
298 | SO_ERROR = 0x4 | |
299 | SO_INCOMING_CPU = 0x31 | |
300 | SO_INCOMING_NAPI_ID = 0x38 | |
301 | SO_KEEPALIVE = 0x9 | |
302 | SO_LINGER = 0xd | |
303 | SO_LOCK_FILTER = 0x2c | |
304 | SO_MARK = 0x24 | |
305 | SO_MAX_PACING_RATE = 0x2f | |
306 | SO_MEMINFO = 0x37 | |
307 | SO_NETNS_COOKIE = 0x47 | |
308 | SO_NOFCS = 0x2b | |
309 | SO_OOBINLINE = 0xa | |
310 | SO_PASSCRED = 0x10 | |
311 | SO_PASSSEC = 0x22 | |
312 | SO_PEEK_OFF = 0x2a | |
313 | SO_PEERCRED = 0x11 | |
314 | SO_PEERGROUPS = 0x3b | |
315 | SO_PEERSEC = 0x1f | |
316 | SO_PREFER_BUSY_POLL = 0x45 | |
317 | SO_PROTOCOL = 0x26 | |
318 | SO_RCVBUF = 0x8 | |
319 | SO_RCVBUFFORCE = 0x21 | |
320 | SO_RCVLOWAT = 0x12 | |
321 | SO_RCVTIMEO = 0x14 | |
322 | SO_RCVTIMEO_NEW = 0x42 | |
323 | SO_RCVTIMEO_OLD = 0x14 | |
324 | SO_RESERVE_MEM = 0x49 | |
325 | SO_REUSEADDR = 0x2 | |
326 | SO_REUSEPORT = 0xf | |
327 | SO_RXQ_OVFL = 0x28 | |
328 | SO_SECURITY_AUTHENTICATION = 0x16 | |
329 | SO_SECURITY_ENCRYPTION_NETWORK = 0x18 | |
330 | SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 | |
331 | SO_SELECT_ERR_QUEUE = 0x2d | |
332 | SO_SNDBUF = 0x7 | |
333 | SO_SNDBUFFORCE = 0x20 | |
334 | SO_SNDLOWAT = 0x13 | |
335 | SO_SNDTIMEO = 0x15 | |
336 | SO_SNDTIMEO_NEW = 0x43 | |
337 | SO_SNDTIMEO_OLD = 0x15 | |
338 | SO_TIMESTAMPING = 0x25 | |
339 | SO_TIMESTAMPING_NEW = 0x41 | |
340 | SO_TIMESTAMPING_OLD = 0x25 | |
341 | SO_TIMESTAMPNS = 0x23 | |
342 | SO_TIMESTAMPNS_NEW = 0x40 | |
343 | SO_TIMESTAMPNS_OLD = 0x23 | |
344 | SO_TIMESTAMP_NEW = 0x3f | |
345 | SO_TXTIME = 0x3d | |
346 | SO_TYPE = 0x3 | |
347 | SO_WIFI_STATUS = 0x29 | |
348 | SO_ZEROCOPY = 0x3c | |
349 | TAB1 = 0x800 | |
350 | TAB2 = 0x1000 | |
351 | TAB3 = 0x1800 | |
352 | TABDLY = 0x1800 | |
353 | TCFLSH = 0x540b | |
354 | TCGETA = 0x5405 | |
355 | TCGETS = 0x5401 | |
356 | TCGETS2 = 0x802c542a | |
357 | TCGETX = 0x5432 | |
358 | TCSAFLUSH = 0x2 | |
359 | TCSBRK = 0x5409 | |
360 | TCSBRKP = 0x5425 | |
361 | TCSETA = 0x5406 | |
362 | TCSETAF = 0x5408 | |
363 | TCSETAW = 0x5407 | |
364 | TCSETS = 0x5402 | |
365 | TCSETS2 = 0x402c542b | |
366 | TCSETSF = 0x5404 | |
367 | TCSETSF2 = 0x402c542d | |
368 | TCSETSW = 0x5403 | |
369 | TCSETSW2 = 0x402c542c | |
370 | TCSETX = 0x5433 | |
371 | TCSETXF = 0x5434 | |
372 | TCSETXW = 0x5435 | |
373 | TCXONC = 0x540a | |
374 | TFD_CLOEXEC = 0x80000 | |
375 | TFD_NONBLOCK = 0x800 | |
376 | TIOCCBRK = 0x5428 | |
377 | TIOCCONS = 0x541d | |
378 | TIOCEXCL = 0x540c | |
379 | TIOCGDEV = 0x80045432 | |
380 | TIOCGETD = 0x5424 | |
381 | TIOCGEXCL = 0x80045440 | |
382 | TIOCGICOUNT = 0x545d | |
383 | TIOCGISO7816 = 0x80285442 | |
384 | TIOCGLCKTRMIOS = 0x5456 | |
385 | TIOCGPGRP = 0x540f | |
386 | TIOCGPKT = 0x80045438 | |
387 | TIOCGPTLCK = 0x80045439 | |
388 | TIOCGPTN = 0x80045430 | |
389 | TIOCGPTPEER = 0x5441 | |
390 | TIOCGRS485 = 0x542e | |
391 | TIOCGSERIAL = 0x541e | |
392 | TIOCGSID = 0x5429 | |
393 | TIOCGSOFTCAR = 0x5419 | |
394 | TIOCGWINSZ = 0x5413 | |
395 | TIOCINQ = 0x541b | |
396 | TIOCLINUX = 0x541c | |
397 | TIOCMBIC = 0x5417 | |
398 | TIOCMBIS = 0x5416 | |
399 | TIOCMGET = 0x5415 | |
400 | TIOCMIWAIT = 0x545c | |
401 | TIOCMSET = 0x5418 | |
402 | TIOCM_CAR = 0x40 | |
403 | TIOCM_CD = 0x40 | |
404 | TIOCM_CTS = 0x20 | |
405 | TIOCM_DSR = 0x100 | |
406 | TIOCM_RI = 0x80 | |
407 | TIOCM_RNG = 0x80 | |
408 | TIOCM_SR = 0x10 | |
409 | TIOCM_ST = 0x8 | |
410 | TIOCNOTTY = 0x5422 | |
411 | TIOCNXCL = 0x540d | |
412 | TIOCOUTQ = 0x5411 | |
413 | TIOCPKT = 0x5420 | |
414 | TIOCSBRK = 0x5427 | |
415 | TIOCSCTTY = 0x540e | |
416 | TIOCSERCONFIG = 0x5453 | |
417 | TIOCSERGETLSR = 0x5459 | |
418 | TIOCSERGETMULTI = 0x545a | |
419 | TIOCSERGSTRUCT = 0x5458 | |
420 | TIOCSERGWILD = 0x5454 | |
421 | TIOCSERSETMULTI = 0x545b | |
422 | TIOCSERSWILD = 0x5455 | |
423 | TIOCSER_TEMT = 0x1 | |
424 | TIOCSETD = 0x5423 | |
425 | TIOCSIG = 0x40045436 | |
426 | TIOCSISO7816 = 0xc0285443 | |
427 | TIOCSLCKTRMIOS = 0x5457 | |
428 | TIOCSPGRP = 0x5410 | |
429 | TIOCSPTLCK = 0x40045431 | |
430 | TIOCSRS485 = 0x542f | |
431 | TIOCSSERIAL = 0x541f | |
432 | TIOCSSOFTCAR = 0x541a | |
433 | TIOCSTI = 0x5412 | |
434 | TIOCSWINSZ = 0x5414 | |
435 | TIOCVHANGUP = 0x5437 | |
436 | TOSTOP = 0x100 | |
437 | TUNATTACHFILTER = 0x401054d5 | |
438 | TUNDETACHFILTER = 0x401054d6 | |
439 | TUNGETDEVNETNS = 0x54e3 | |
440 | TUNGETFEATURES = 0x800454cf | |
441 | TUNGETFILTER = 0x801054db | |
442 | TUNGETIFF = 0x800454d2 | |
443 | TUNGETSNDBUF = 0x800454d3 | |
444 | TUNGETVNETBE = 0x800454df | |
445 | TUNGETVNETHDRSZ = 0x800454d7 | |
446 | TUNGETVNETLE = 0x800454dd | |
447 | TUNSETCARRIER = 0x400454e2 | |
448 | TUNSETDEBUG = 0x400454c9 | |
449 | TUNSETFILTEREBPF = 0x800454e1 | |
450 | TUNSETGROUP = 0x400454ce | |
451 | TUNSETIFF = 0x400454ca | |
452 | TUNSETIFINDEX = 0x400454da | |
453 | TUNSETLINK = 0x400454cd | |
454 | TUNSETNOCSUM = 0x400454c8 | |
455 | TUNSETOFFLOAD = 0x400454d0 | |
456 | TUNSETOWNER = 0x400454cc | |
457 | TUNSETPERSIST = 0x400454cb | |
458 | TUNSETQUEUE = 0x400454d9 | |
459 | TUNSETSNDBUF = 0x400454d4 | |
460 | TUNSETSTEERINGEBPF = 0x800454e0 | |
461 | TUNSETTXFILTER = 0x400454d1 | |
462 | TUNSETVNETBE = 0x400454de | |
463 | TUNSETVNETHDRSZ = 0x400454d8 | |
464 | TUNSETVNETLE = 0x400454dc | |
465 | UBI_IOCATT = 0x40186f40 | |
466 | UBI_IOCDET = 0x40046f41 | |
467 | UBI_IOCEBCH = 0x40044f02 | |
468 | UBI_IOCEBER = 0x40044f01 | |
469 | UBI_IOCEBISMAP = 0x80044f05 | |
470 | UBI_IOCEBMAP = 0x40084f03 | |
471 | UBI_IOCEBUNMAP = 0x40044f04 | |
472 | UBI_IOCMKVOL = 0x40986f00 | |
473 | UBI_IOCRMVOL = 0x40046f01 | |
474 | UBI_IOCRNVOL = 0x51106f03 | |
475 | UBI_IOCRPEB = 0x40046f04 | |
476 | UBI_IOCRSVOL = 0x400c6f02 | |
477 | UBI_IOCSETVOLPROP = 0x40104f06 | |
478 | UBI_IOCSPEB = 0x40046f05 | |
479 | UBI_IOCVOLCRBLK = 0x40804f07 | |
480 | UBI_IOCVOLRMBLK = 0x4f08 | |
481 | UBI_IOCVOLUP = 0x40084f00 | |
482 | VDISCARD = 0xd | |
483 | VEOF = 0x4 | |
484 | VEOL = 0xb | |
485 | VEOL2 = 0x10 | |
486 | VMIN = 0x6 | |
487 | VREPRINT = 0xc | |
488 | VSTART = 0x8 | |
489 | VSTOP = 0x9 | |
490 | VSUSP = 0xa | |
491 | VSWTC = 0x7 | |
492 | VT1 = 0x4000 | |
493 | VTDLY = 0x4000 | |
494 | VTIME = 0x5 | |
495 | VWERASE = 0xe | |
496 | WDIOC_GETBOOTSTATUS = 0x80045702 | |
497 | WDIOC_GETPRETIMEOUT = 0x80045709 | |
498 | WDIOC_GETSTATUS = 0x80045701 | |
499 | WDIOC_GETSUPPORT = 0x80285700 | |
500 | WDIOC_GETTEMP = 0x80045703 | |
501 | WDIOC_GETTIMELEFT = 0x8004570a | |
502 | WDIOC_GETTIMEOUT = 0x80045707 | |
503 | WDIOC_KEEPALIVE = 0x80045705 | |
504 | WDIOC_SETOPTIONS = 0x80045704 | |
505 | WORDSIZE = 0x40 | |
506 | XCASE = 0x4 | |
507 | XTABS = 0x1800 | |
508 | _HIDIOCGRAWNAME = 0x80804804 | |
509 | _HIDIOCGRAWPHYS = 0x80404805 | |
510 | _HIDIOCGRAWUNIQ = 0x80404808 | |
511 | ) | |
512 | ||
513 | // Errors | |
514 | const ( | |
515 | EADDRINUSE = syscall.Errno(0x62) | |
516 | EADDRNOTAVAIL = syscall.Errno(0x63) | |
517 | EADV = syscall.Errno(0x44) | |
518 | EAFNOSUPPORT = syscall.Errno(0x61) | |
519 | EALREADY = syscall.Errno(0x72) | |
520 | EBADE = syscall.Errno(0x34) | |
521 | EBADFD = syscall.Errno(0x4d) | |
522 | EBADMSG = syscall.Errno(0x4a) | |
523 | EBADR = syscall.Errno(0x35) | |
524 | EBADRQC = syscall.Errno(0x38) | |
525 | EBADSLT = syscall.Errno(0x39) | |
526 | EBFONT = syscall.Errno(0x3b) | |
527 | ECANCELED = syscall.Errno(0x7d) | |
528 | ECHRNG = syscall.Errno(0x2c) | |
529 | ECOMM = syscall.Errno(0x46) | |
530 | ECONNABORTED = syscall.Errno(0x67) | |
531 | ECONNREFUSED = syscall.Errno(0x6f) | |
532 | ECONNRESET = syscall.Errno(0x68) | |
533 | EDEADLK = syscall.Errno(0x23) | |
534 | EDEADLOCK = syscall.Errno(0x23) | |
535 | EDESTADDRREQ = syscall.Errno(0x59) | |
536 | EDOTDOT = syscall.Errno(0x49) | |
537 | EDQUOT = syscall.Errno(0x7a) | |
538 | EHOSTDOWN = syscall.Errno(0x70) | |
539 | EHOSTUNREACH = syscall.Errno(0x71) | |
540 | EHWPOISON = syscall.Errno(0x85) | |
541 | EIDRM = syscall.Errno(0x2b) | |
542 | EILSEQ = syscall.Errno(0x54) | |
543 | EINPROGRESS = syscall.Errno(0x73) | |
544 | EISCONN = syscall.Errno(0x6a) | |
545 | EISNAM = syscall.Errno(0x78) | |
546 | EKEYEXPIRED = syscall.Errno(0x7f) | |
547 | EKEYREJECTED = syscall.Errno(0x81) | |
548 | EKEYREVOKED = syscall.Errno(0x80) | |
549 | EL2HLT = syscall.Errno(0x33) | |
550 | EL2NSYNC = syscall.Errno(0x2d) | |
551 | EL3HLT = syscall.Errno(0x2e) | |
552 | EL3RST = syscall.Errno(0x2f) | |
553 | ELIBACC = syscall.Errno(0x4f) | |
554 | ELIBBAD = syscall.Errno(0x50) | |
555 | ELIBEXEC = syscall.Errno(0x53) | |
556 | ELIBMAX = syscall.Errno(0x52) | |
557 | ELIBSCN = syscall.Errno(0x51) | |
558 | ELNRNG = syscall.Errno(0x30) | |
559 | ELOOP = syscall.Errno(0x28) | |
560 | EMEDIUMTYPE = syscall.Errno(0x7c) | |
561 | EMSGSIZE = syscall.Errno(0x5a) | |
562 | EMULTIHOP = syscall.Errno(0x48) | |
563 | ENAMETOOLONG = syscall.Errno(0x24) | |
564 | ENAVAIL = syscall.Errno(0x77) | |
565 | ENETDOWN = syscall.Errno(0x64) | |
566 | ENETRESET = syscall.Errno(0x66) | |
567 | ENETUNREACH = syscall.Errno(0x65) | |
568 | ENOANO = syscall.Errno(0x37) | |
569 | ENOBUFS = syscall.Errno(0x69) | |
570 | ENOCSI = syscall.Errno(0x32) | |
571 | ENODATA = syscall.Errno(0x3d) | |
572 | ENOKEY = syscall.Errno(0x7e) | |
573 | ENOLCK = syscall.Errno(0x25) | |
574 | ENOLINK = syscall.Errno(0x43) | |
575 | ENOMEDIUM = syscall.Errno(0x7b) | |
576 | ENOMSG = syscall.Errno(0x2a) | |
577 | ENONET = syscall.Errno(0x40) | |
578 | ENOPKG = syscall.Errno(0x41) | |
579 | ENOPROTOOPT = syscall.Errno(0x5c) | |
580 | ENOSR = syscall.Errno(0x3f) | |
581 | ENOSTR = syscall.Errno(0x3c) | |
582 | ENOSYS = syscall.Errno(0x26) | |
583 | ENOTCONN = syscall.Errno(0x6b) | |
584 | ENOTEMPTY = syscall.Errno(0x27) | |
585 | ENOTNAM = syscall.Errno(0x76) | |
586 | ENOTRECOVERABLE = syscall.Errno(0x83) | |
587 | ENOTSOCK = syscall.Errno(0x58) | |
588 | ENOTSUP = syscall.Errno(0x5f) | |
589 | ENOTUNIQ = syscall.Errno(0x4c) | |
590 | EOPNOTSUPP = syscall.Errno(0x5f) | |
591 | EOVERFLOW = syscall.Errno(0x4b) | |
592 | EOWNERDEAD = syscall.Errno(0x82) | |
593 | EPFNOSUPPORT = syscall.Errno(0x60) | |
594 | EPROTO = syscall.Errno(0x47) | |
595 | EPROTONOSUPPORT = syscall.Errno(0x5d) | |
596 | EPROTOTYPE = syscall.Errno(0x5b) | |
597 | EREMCHG = syscall.Errno(0x4e) | |
598 | EREMOTE = syscall.Errno(0x42) | |
599 | EREMOTEIO = syscall.Errno(0x79) | |
600 | ERESTART = syscall.Errno(0x55) | |
601 | ERFKILL = syscall.Errno(0x84) | |
602 | ESHUTDOWN = syscall.Errno(0x6c) | |
603 | ESOCKTNOSUPPORT = syscall.Errno(0x5e) | |
604 | ESRMNT = syscall.Errno(0x45) | |
605 | ESTALE = syscall.Errno(0x74) | |
606 | ESTRPIPE = syscall.Errno(0x56) | |
607 | ETIME = syscall.Errno(0x3e) | |
608 | ETIMEDOUT = syscall.Errno(0x6e) | |
609 | ETOOMANYREFS = syscall.Errno(0x6d) | |
610 | EUCLEAN = syscall.Errno(0x75) | |
611 | EUNATCH = syscall.Errno(0x31) | |
612 | EUSERS = syscall.Errno(0x57) | |
613 | EXFULL = syscall.Errno(0x36) | |
614 | ) | |
615 | ||
616 | // Signals | |
617 | const ( | |
618 | SIGBUS = syscall.Signal(0x7) | |
619 | SIGCHLD = syscall.Signal(0x11) | |
620 | SIGCLD = syscall.Signal(0x11) | |
621 | SIGCONT = syscall.Signal(0x12) | |
622 | SIGIO = syscall.Signal(0x1d) | |
623 | SIGPOLL = syscall.Signal(0x1d) | |
624 | SIGPROF = syscall.Signal(0x1b) | |
625 | SIGPWR = syscall.Signal(0x1e) | |
626 | SIGSTKFLT = syscall.Signal(0x10) | |
627 | SIGSTOP = syscall.Signal(0x13) | |
628 | SIGSYS = syscall.Signal(0x1f) | |
629 | SIGTSTP = syscall.Signal(0x14) | |
630 | SIGTTIN = syscall.Signal(0x15) | |
631 | SIGTTOU = syscall.Signal(0x16) | |
632 | SIGURG = syscall.Signal(0x17) | |
633 | SIGUSR1 = syscall.Signal(0xa) | |
634 | SIGUSR2 = syscall.Signal(0xc) | |
635 | SIGVTALRM = syscall.Signal(0x1a) | |
636 | SIGWINCH = syscall.Signal(0x1c) | |
637 | SIGXCPU = syscall.Signal(0x18) | |
638 | SIGXFSZ = syscall.Signal(0x19) | |
639 | ) | |
640 | ||
641 | // Error table | |
642 | var errorList = [...]struct { | |
643 | num syscall.Errno | |
644 | name string | |
645 | desc string | |
646 | }{ | |
647 | {1, "EPERM", "operation not permitted"}, | |
648 | {2, "ENOENT", "no such file or directory"}, | |
649 | {3, "ESRCH", "no such process"}, | |
650 | {4, "EINTR", "interrupted system call"}, | |
651 | {5, "EIO", "input/output error"}, | |
652 | {6, "ENXIO", "no such device or address"}, | |
653 | {7, "E2BIG", "argument list too long"}, | |
654 | {8, "ENOEXEC", "exec format error"}, | |
655 | {9, "EBADF", "bad file descriptor"}, | |
656 | {10, "ECHILD", "no child processes"}, | |
657 | {11, "EAGAIN", "resource temporarily unavailable"}, | |
658 | {12, "ENOMEM", "cannot allocate memory"}, | |
659 | {13, "EACCES", "permission denied"}, | |
660 | {14, "EFAULT", "bad address"}, | |
661 | {15, "ENOTBLK", "block device required"}, | |
662 | {16, "EBUSY", "device or resource busy"}, | |
663 | {17, "EEXIST", "file exists"}, | |
664 | {18, "EXDEV", "invalid cross-device link"}, | |
665 | {19, "ENODEV", "no such device"}, | |
666 | {20, "ENOTDIR", "not a directory"}, | |
667 | {21, "EISDIR", "is a directory"}, | |
668 | {22, "EINVAL", "invalid argument"}, | |
669 | {23, "ENFILE", "too many open files in system"}, | |
670 | {24, "EMFILE", "too many open files"}, | |
671 | {25, "ENOTTY", "inappropriate ioctl for device"}, | |
672 | {26, "ETXTBSY", "text file busy"}, | |
673 | {27, "EFBIG", "file too large"}, | |
674 | {28, "ENOSPC", "no space left on device"}, | |
675 | {29, "ESPIPE", "illegal seek"}, | |
676 | {30, "EROFS", "read-only file system"}, | |
677 | {31, "EMLINK", "too many links"}, | |
678 | {32, "EPIPE", "broken pipe"}, | |
679 | {33, "EDOM", "numerical argument out of domain"}, | |
680 | {34, "ERANGE", "numerical result out of range"}, | |
681 | {35, "EDEADLK", "resource deadlock avoided"}, | |
682 | {36, "ENAMETOOLONG", "file name too long"}, | |
683 | {37, "ENOLCK", "no locks available"}, | |
684 | {38, "ENOSYS", "function not implemented"}, | |
685 | {39, "ENOTEMPTY", "directory not empty"}, | |
686 | {40, "ELOOP", "too many levels of symbolic links"}, | |
687 | {42, "ENOMSG", "no message of desired type"}, | |
688 | {43, "EIDRM", "identifier removed"}, | |
689 | {44, "ECHRNG", "channel number out of range"}, | |
690 | {45, "EL2NSYNC", "level 2 not synchronized"}, | |
691 | {46, "EL3HLT", "level 3 halted"}, | |
692 | {47, "EL3RST", "level 3 reset"}, | |
693 | {48, "ELNRNG", "link number out of range"}, | |
694 | {49, "EUNATCH", "protocol driver not attached"}, | |
695 | {50, "ENOCSI", "no CSI structure available"}, | |
696 | {51, "EL2HLT", "level 2 halted"}, | |
697 | {52, "EBADE", "invalid exchange"}, | |
698 | {53, "EBADR", "invalid request descriptor"}, | |
699 | {54, "EXFULL", "exchange full"}, | |
700 | {55, "ENOANO", "no anode"}, | |
701 | {56, "EBADRQC", "invalid request code"}, | |
702 | {57, "EBADSLT", "invalid slot"}, | |
703 | {59, "EBFONT", "bad font file format"}, | |
704 | {60, "ENOSTR", "device not a stream"}, | |
705 | {61, "ENODATA", "no data available"}, | |
706 | {62, "ETIME", "timer expired"}, | |
707 | {63, "ENOSR", "out of streams resources"}, | |
708 | {64, "ENONET", "machine is not on the network"}, | |
709 | {65, "ENOPKG", "package not installed"}, | |
710 | {66, "EREMOTE", "object is remote"}, | |
711 | {67, "ENOLINK", "link has been severed"}, | |
712 | {68, "EADV", "advertise error"}, | |
713 | {69, "ESRMNT", "srmount error"}, | |
714 | {70, "ECOMM", "communication error on send"}, | |
715 | {71, "EPROTO", "protocol error"}, | |
716 | {72, "EMULTIHOP", "multihop attempted"}, | |
717 | {73, "EDOTDOT", "RFS specific error"}, | |
718 | {74, "EBADMSG", "bad message"}, | |
719 | {75, "EOVERFLOW", "value too large for defined data type"}, | |
720 | {76, "ENOTUNIQ", "name not unique on network"}, | |
721 | {77, "EBADFD", "file descriptor in bad state"}, | |
722 | {78, "EREMCHG", "remote address changed"}, | |
723 | {79, "ELIBACC", "can not access a needed shared library"}, | |
724 | {80, "ELIBBAD", "accessing a corrupted shared library"}, | |
725 | {81, "ELIBSCN", ".lib section in a.out corrupted"}, | |
726 | {82, "ELIBMAX", "attempting to link in too many shared libraries"}, | |
727 | {83, "ELIBEXEC", "cannot exec a shared library directly"}, | |
728 | {84, "EILSEQ", "invalid or incomplete multibyte or wide character"}, | |
729 | {85, "ERESTART", "interrupted system call should be restarted"}, | |
730 | {86, "ESTRPIPE", "streams pipe error"}, | |
731 | {87, "EUSERS", "too many users"}, | |
732 | {88, "ENOTSOCK", "socket operation on non-socket"}, | |
733 | {89, "EDESTADDRREQ", "destination address required"}, | |
734 | {90, "EMSGSIZE", "message too long"}, | |
735 | {91, "EPROTOTYPE", "protocol wrong type for socket"}, | |
736 | {92, "ENOPROTOOPT", "protocol not available"}, | |
737 | {93, "EPROTONOSUPPORT", "protocol not supported"}, | |
738 | {94, "ESOCKTNOSUPPORT", "socket type not supported"}, | |
739 | {95, "ENOTSUP", "operation not supported"}, | |
740 | {96, "EPFNOSUPPORT", "protocol family not supported"}, | |
741 | {97, "EAFNOSUPPORT", "address family not supported by protocol"}, | |
742 | {98, "EADDRINUSE", "address already in use"}, | |
743 | {99, "EADDRNOTAVAIL", "cannot assign requested address"}, | |
744 | {100, "ENETDOWN", "network is down"}, | |
745 | {101, "ENETUNREACH", "network is unreachable"}, | |
746 | {102, "ENETRESET", "network dropped connection on reset"}, | |
747 | {103, "ECONNABORTED", "software caused connection abort"}, | |
748 | {104, "ECONNRESET", "connection reset by peer"}, | |
749 | {105, "ENOBUFS", "no buffer space available"}, | |
750 | {106, "EISCONN", "transport endpoint is already connected"}, | |
751 | {107, "ENOTCONN", "transport endpoint is not connected"}, | |
752 | {108, "ESHUTDOWN", "cannot send after transport endpoint shutdown"}, | |
753 | {109, "ETOOMANYREFS", "too many references: cannot splice"}, | |
754 | {110, "ETIMEDOUT", "connection timed out"}, | |
755 | {111, "ECONNREFUSED", "connection refused"}, | |
756 | {112, "EHOSTDOWN", "host is down"}, | |
757 | {113, "EHOSTUNREACH", "no route to host"}, | |
758 | {114, "EALREADY", "operation already in progress"}, | |
759 | {115, "EINPROGRESS", "operation now in progress"}, | |
760 | {116, "ESTALE", "stale file handle"}, | |
761 | {117, "EUCLEAN", "structure needs cleaning"}, | |
762 | {118, "ENOTNAM", "not a XENIX named type file"}, | |
763 | {119, "ENAVAIL", "no XENIX semaphores available"}, | |
764 | {120, "EISNAM", "is a named type file"}, | |
765 | {121, "EREMOTEIO", "remote I/O error"}, | |
766 | {122, "EDQUOT", "disk quota exceeded"}, | |
767 | {123, "ENOMEDIUM", "no medium found"}, | |
768 | {124, "EMEDIUMTYPE", "wrong medium type"}, | |
769 | {125, "ECANCELED", "operation canceled"}, | |
770 | {126, "ENOKEY", "required key not available"}, | |
771 | {127, "EKEYEXPIRED", "key has expired"}, | |
772 | {128, "EKEYREVOKED", "key has been revoked"}, | |
773 | {129, "EKEYREJECTED", "key was rejected by service"}, | |
774 | {130, "EOWNERDEAD", "owner died"}, | |
775 | {131, "ENOTRECOVERABLE", "state not recoverable"}, | |
776 | {132, "ERFKILL", "operation not possible due to RF-kill"}, | |
777 | {133, "EHWPOISON", "memory page has hardware error"}, | |
778 | } | |
779 | ||
780 | // Signal table | |
781 | var signalList = [...]struct { | |
782 | num syscall.Signal | |
783 | name string | |
784 | desc string | |
785 | }{ | |
786 | {1, "SIGHUP", "hangup"}, | |
787 | {2, "SIGINT", "interrupt"}, | |
788 | {3, "SIGQUIT", "quit"}, | |
789 | {4, "SIGILL", "illegal instruction"}, | |
790 | {5, "SIGTRAP", "trace/breakpoint trap"}, | |
791 | {6, "SIGABRT", "aborted"}, | |
792 | {7, "SIGBUS", "bus error"}, | |
793 | {8, "SIGFPE", "floating point exception"}, | |
794 | {9, "SIGKILL", "killed"}, | |
795 | {10, "SIGUSR1", "user defined signal 1"}, | |
796 | {11, "SIGSEGV", "segmentation fault"}, | |
797 | {12, "SIGUSR2", "user defined signal 2"}, | |
798 | {13, "SIGPIPE", "broken pipe"}, | |
799 | {14, "SIGALRM", "alarm clock"}, | |
800 | {15, "SIGTERM", "terminated"}, | |
801 | {16, "SIGSTKFLT", "stack fault"}, | |
802 | {17, "SIGCHLD", "child exited"}, | |
803 | {18, "SIGCONT", "continued"}, | |
804 | {19, "SIGSTOP", "stopped (signal)"}, | |
805 | {20, "SIGTSTP", "stopped"}, | |
806 | {21, "SIGTTIN", "stopped (tty input)"}, | |
807 | {22, "SIGTTOU", "stopped (tty output)"}, | |
808 | {23, "SIGURG", "urgent I/O condition"}, | |
809 | {24, "SIGXCPU", "CPU time limit exceeded"}, | |
810 | {25, "SIGXFSZ", "file size limit exceeded"}, | |
811 | {26, "SIGVTALRM", "virtual timer expired"}, | |
812 | {27, "SIGPROF", "profiling timer expired"}, | |
813 | {28, "SIGWINCH", "window changed"}, | |
814 | {29, "SIGIO", "I/O possible"}, | |
815 | {30, "SIGPWR", "power failure"}, | |
816 | {31, "SIGSYS", "bad system call"}, | |
817 | } |
0 | // go run mksyscall.go -tags linux,loong64 syscall_linux.go syscall_linux_loong64.go | |
1 | // Code generated by the command above; see README.md. DO NOT EDIT. | |
2 | ||
3 | //go:build linux && loong64 | |
4 | // +build linux,loong64 | |
5 | ||
6 | package unix | |
7 | ||
8 | import ( | |
9 | "syscall" | |
10 | "unsafe" | |
11 | ) | |
12 | ||
13 | var _ syscall.Errno | |
14 | ||
15 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
16 | ||
17 | func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { | |
18 | _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0) | |
19 | if e1 != 0 { | |
20 | err = errnoErr(e1) | |
21 | } | |
22 | return | |
23 | } | |
24 | ||
25 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
26 | ||
27 | func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { | |
28 | _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) | |
29 | if e1 != 0 { | |
30 | err = errnoErr(e1) | |
31 | } | |
32 | return | |
33 | } | |
34 | ||
35 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
36 | ||
37 | func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { | |
38 | r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0) | |
39 | n = int64(r0) | |
40 | if e1 != 0 { | |
41 | err = errnoErr(e1) | |
42 | } | |
43 | return | |
44 | } | |
45 | ||
46 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
47 | ||
48 | func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { | |
49 | var _p0 unsafe.Pointer | |
50 | if len(events) > 0 { | |
51 | _p0 = unsafe.Pointer(&events[0]) | |
52 | } else { | |
53 | _p0 = unsafe.Pointer(&_zero) | |
54 | } | |
55 | r0, _, e1 := Syscall6(SYS_EPOLL_PWAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0) | |
56 | n = int(r0) | |
57 | if e1 != 0 { | |
58 | err = errnoErr(e1) | |
59 | } | |
60 | return | |
61 | } | |
62 | ||
63 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
64 | ||
65 | func Fadvise(fd int, offset int64, length int64, advice int) (err error) { | |
66 | _, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0) | |
67 | if e1 != 0 { | |
68 | err = errnoErr(e1) | |
69 | } | |
70 | return | |
71 | } | |
72 | ||
73 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
74 | ||
75 | func Fchown(fd int, uid int, gid int) (err error) { | |
76 | _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) | |
77 | if e1 != 0 { | |
78 | err = errnoErr(e1) | |
79 | } | |
80 | return | |
81 | } | |
82 | ||
83 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
84 | ||
85 | func Fstat(fd int, stat *Stat_t) (err error) { | |
86 | _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) | |
87 | if e1 != 0 { | |
88 | err = errnoErr(e1) | |
89 | } | |
90 | return | |
91 | } | |
92 | ||
93 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
94 | ||
95 | func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) { | |
96 | var _p0 *byte | |
97 | _p0, err = BytePtrFromString(path) | |
98 | if err != nil { | |
99 | return | |
100 | } | |
101 | _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) | |
102 | if e1 != 0 { | |
103 | err = errnoErr(e1) | |
104 | } | |
105 | return | |
106 | } | |
107 | ||
108 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
109 | ||
110 | func Fstatfs(fd int, buf *Statfs_t) (err error) { | |
111 | _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0) | |
112 | if e1 != 0 { | |
113 | err = errnoErr(e1) | |
114 | } | |
115 | return | |
116 | } | |
117 | ||
118 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
119 | ||
120 | func Ftruncate(fd int, length int64) (err error) { | |
121 | _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) | |
122 | if e1 != 0 { | |
123 | err = errnoErr(e1) | |
124 | } | |
125 | return | |
126 | } | |
127 | ||
128 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
129 | ||
130 | func Getegid() (egid int) { | |
131 | r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0) | |
132 | egid = int(r0) | |
133 | return | |
134 | } | |
135 | ||
136 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
137 | ||
138 | func Geteuid() (euid int) { | |
139 | r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0) | |
140 | euid = int(r0) | |
141 | return | |
142 | } | |
143 | ||
144 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
145 | ||
146 | func Getgid() (gid int) { | |
147 | r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0) | |
148 | gid = int(r0) | |
149 | return | |
150 | } | |
151 | ||
152 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
153 | ||
154 | func Getuid() (uid int) { | |
155 | r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0) | |
156 | uid = int(r0) | |
157 | return | |
158 | } | |
159 | ||
160 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
161 | ||
162 | func Listen(s int, n int) (err error) { | |
163 | _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0) | |
164 | if e1 != 0 { | |
165 | err = errnoErr(e1) | |
166 | } | |
167 | return | |
168 | } | |
169 | ||
170 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
171 | ||
172 | func pread(fd int, p []byte, offset int64) (n int, err error) { | |
173 | var _p0 unsafe.Pointer | |
174 | if len(p) > 0 { | |
175 | _p0 = unsafe.Pointer(&p[0]) | |
176 | } else { | |
177 | _p0 = unsafe.Pointer(&_zero) | |
178 | } | |
179 | r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) | |
180 | n = int(r0) | |
181 | if e1 != 0 { | |
182 | err = errnoErr(e1) | |
183 | } | |
184 | return | |
185 | } | |
186 | ||
187 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
188 | ||
189 | func pwrite(fd int, p []byte, offset int64) (n int, err error) { | |
190 | var _p0 unsafe.Pointer | |
191 | if len(p) > 0 { | |
192 | _p0 = unsafe.Pointer(&p[0]) | |
193 | } else { | |
194 | _p0 = unsafe.Pointer(&_zero) | |
195 | } | |
196 | r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) | |
197 | n = int(r0) | |
198 | if e1 != 0 { | |
199 | err = errnoErr(e1) | |
200 | } | |
201 | return | |
202 | } | |
203 | ||
204 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
205 | ||
206 | func Seek(fd int, offset int64, whence int) (off int64, err error) { | |
207 | r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) | |
208 | off = int64(r0) | |
209 | if e1 != 0 { | |
210 | err = errnoErr(e1) | |
211 | } | |
212 | return | |
213 | } | |
214 | ||
215 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
216 | ||
217 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { | |
218 | r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) | |
219 | written = int(r0) | |
220 | if e1 != 0 { | |
221 | err = errnoErr(e1) | |
222 | } | |
223 | return | |
224 | } | |
225 | ||
226 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
227 | ||
228 | func setfsgid(gid int) (prev int, err error) { | |
229 | r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) | |
230 | prev = int(r0) | |
231 | if e1 != 0 { | |
232 | err = errnoErr(e1) | |
233 | } | |
234 | return | |
235 | } | |
236 | ||
237 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
238 | ||
239 | func setfsuid(uid int) (prev int, err error) { | |
240 | r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) | |
241 | prev = int(r0) | |
242 | if e1 != 0 { | |
243 | err = errnoErr(e1) | |
244 | } | |
245 | return | |
246 | } | |
247 | ||
248 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
249 | ||
250 | func Setregid(rgid int, egid int) (err error) { | |
251 | _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) | |
252 | if e1 != 0 { | |
253 | err = errnoErr(e1) | |
254 | } | |
255 | return | |
256 | } | |
257 | ||
258 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
259 | ||
260 | func Setresgid(rgid int, egid int, sgid int) (err error) { | |
261 | _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) | |
262 | if e1 != 0 { | |
263 | err = errnoErr(e1) | |
264 | } | |
265 | return | |
266 | } | |
267 | ||
268 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
269 | ||
270 | func Setresuid(ruid int, euid int, suid int) (err error) { | |
271 | _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) | |
272 | if e1 != 0 { | |
273 | err = errnoErr(e1) | |
274 | } | |
275 | return | |
276 | } | |
277 | ||
278 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
279 | ||
280 | func Setreuid(ruid int, euid int) (err error) { | |
281 | _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) | |
282 | if e1 != 0 { | |
283 | err = errnoErr(e1) | |
284 | } | |
285 | return | |
286 | } | |
287 | ||
288 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
289 | ||
290 | func Shutdown(fd int, how int) (err error) { | |
291 | _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) | |
292 | if e1 != 0 { | |
293 | err = errnoErr(e1) | |
294 | } | |
295 | return | |
296 | } | |
297 | ||
298 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
299 | ||
300 | func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) { | |
301 | r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) | |
302 | n = int64(r0) | |
303 | if e1 != 0 { | |
304 | err = errnoErr(e1) | |
305 | } | |
306 | return | |
307 | } | |
308 | ||
309 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
310 | ||
311 | func Statfs(path string, buf *Statfs_t) (err error) { | |
312 | var _p0 *byte | |
313 | _p0, err = BytePtrFromString(path) | |
314 | if err != nil { | |
315 | return | |
316 | } | |
317 | _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) | |
318 | if e1 != 0 { | |
319 | err = errnoErr(e1) | |
320 | } | |
321 | return | |
322 | } | |
323 | ||
324 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
325 | ||
326 | func SyncFileRange(fd int, off int64, n int64, flags int) (err error) { | |
327 | _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0) | |
328 | if e1 != 0 { | |
329 | err = errnoErr(e1) | |
330 | } | |
331 | return | |
332 | } | |
333 | ||
334 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
335 | ||
336 | func Truncate(path string, length int64) (err error) { | |
337 | var _p0 *byte | |
338 | _p0, err = BytePtrFromString(path) | |
339 | if err != nil { | |
340 | return | |
341 | } | |
342 | _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) | |
343 | if e1 != 0 { | |
344 | err = errnoErr(e1) | |
345 | } | |
346 | return | |
347 | } | |
348 | ||
349 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
350 | ||
351 | func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { | |
352 | r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) | |
353 | fd = int(r0) | |
354 | if e1 != 0 { | |
355 | err = errnoErr(e1) | |
356 | } | |
357 | return | |
358 | } | |
359 | ||
360 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
361 | ||
362 | func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { | |
363 | _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) | |
364 | if e1 != 0 { | |
365 | err = errnoErr(e1) | |
366 | } | |
367 | return | |
368 | } | |
369 | ||
370 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
371 | ||
372 | func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { | |
373 | _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) | |
374 | if e1 != 0 { | |
375 | err = errnoErr(e1) | |
376 | } | |
377 | return | |
378 | } | |
379 | ||
380 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
381 | ||
382 | func getgroups(n int, list *_Gid_t) (nn int, err error) { | |
383 | r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) | |
384 | nn = int(r0) | |
385 | if e1 != 0 { | |
386 | err = errnoErr(e1) | |
387 | } | |
388 | return | |
389 | } | |
390 | ||
391 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
392 | ||
393 | func setgroups(n int, list *_Gid_t) (err error) { | |
394 | _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) | |
395 | if e1 != 0 { | |
396 | err = errnoErr(e1) | |
397 | } | |
398 | return | |
399 | } | |
400 | ||
401 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
402 | ||
403 | func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { | |
404 | _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) | |
405 | if e1 != 0 { | |
406 | err = errnoErr(e1) | |
407 | } | |
408 | return | |
409 | } | |
410 | ||
411 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
412 | ||
413 | func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { | |
414 | _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) | |
415 | if e1 != 0 { | |
416 | err = errnoErr(e1) | |
417 | } | |
418 | return | |
419 | } | |
420 | ||
421 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
422 | ||
423 | func socket(domain int, typ int, proto int) (fd int, err error) { | |
424 | r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) | |
425 | fd = int(r0) | |
426 | if e1 != 0 { | |
427 | err = errnoErr(e1) | |
428 | } | |
429 | return | |
430 | } | |
431 | ||
432 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
433 | ||
434 | func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { | |
435 | _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) | |
436 | if e1 != 0 { | |
437 | err = errnoErr(e1) | |
438 | } | |
439 | return | |
440 | } | |
441 | ||
442 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
443 | ||
444 | func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { | |
445 | _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) | |
446 | if e1 != 0 { | |
447 | err = errnoErr(e1) | |
448 | } | |
449 | return | |
450 | } | |
451 | ||
452 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
453 | ||
454 | func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { | |
455 | _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) | |
456 | if e1 != 0 { | |
457 | err = errnoErr(e1) | |
458 | } | |
459 | return | |
460 | } | |
461 | ||
462 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
463 | ||
464 | func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { | |
465 | var _p0 unsafe.Pointer | |
466 | if len(p) > 0 { | |
467 | _p0 = unsafe.Pointer(&p[0]) | |
468 | } else { | |
469 | _p0 = unsafe.Pointer(&_zero) | |
470 | } | |
471 | r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) | |
472 | n = int(r0) | |
473 | if e1 != 0 { | |
474 | err = errnoErr(e1) | |
475 | } | |
476 | return | |
477 | } | |
478 | ||
479 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
480 | ||
481 | func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { | |
482 | var _p0 unsafe.Pointer | |
483 | if len(buf) > 0 { | |
484 | _p0 = unsafe.Pointer(&buf[0]) | |
485 | } else { | |
486 | _p0 = unsafe.Pointer(&_zero) | |
487 | } | |
488 | _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) | |
489 | if e1 != 0 { | |
490 | err = errnoErr(e1) | |
491 | } | |
492 | return | |
493 | } | |
494 | ||
495 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
496 | ||
497 | func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { | |
498 | r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) | |
499 | n = int(r0) | |
500 | if e1 != 0 { | |
501 | err = errnoErr(e1) | |
502 | } | |
503 | return | |
504 | } | |
505 | ||
506 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
507 | ||
508 | func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { | |
509 | r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) | |
510 | n = int(r0) | |
511 | if e1 != 0 { | |
512 | err = errnoErr(e1) | |
513 | } | |
514 | return | |
515 | } | |
516 | ||
517 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
518 | ||
519 | func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { | |
520 | r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)) | |
521 | xaddr = uintptr(r0) | |
522 | if e1 != 0 { | |
523 | err = errnoErr(e1) | |
524 | } | |
525 | return | |
526 | } | |
527 | ||
528 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
529 | ||
530 | func Gettimeofday(tv *Timeval) (err error) { | |
531 | _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) | |
532 | if e1 != 0 { | |
533 | err = errnoErr(e1) | |
534 | } | |
535 | return | |
536 | } | |
537 | ||
538 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT | |
539 | ||
540 | func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) { | |
541 | var _p0 *byte | |
542 | _p0, err = BytePtrFromString(cmdline) | |
543 | if err != nil { | |
544 | return | |
545 | } | |
546 | _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) | |
547 | if e1 != 0 { | |
548 | err = errnoErr(e1) | |
549 | } | |
550 | return | |
551 | } |
0 | // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h | |
1 | // Code generated by the command above; see README.md. DO NOT EDIT. | |
2 | ||
3 | //go:build loong64 && linux | |
4 | // +build loong64,linux | |
5 | ||
6 | package unix | |
7 | ||
8 | const ( | |
9 | SYS_IO_SETUP = 0 | |
10 | SYS_IO_DESTROY = 1 | |
11 | SYS_IO_SUBMIT = 2 | |
12 | SYS_IO_CANCEL = 3 | |
13 | SYS_IO_GETEVENTS = 4 | |
14 | SYS_SETXATTR = 5 | |
15 | SYS_LSETXATTR = 6 | |
16 | SYS_FSETXATTR = 7 | |
17 | SYS_GETXATTR = 8 | |
18 | SYS_LGETXATTR = 9 | |
19 | SYS_FGETXATTR = 10 | |
20 | SYS_LISTXATTR = 11 | |
21 | SYS_LLISTXATTR = 12 | |
22 | SYS_FLISTXATTR = 13 | |
23 | SYS_REMOVEXATTR = 14 | |
24 | SYS_LREMOVEXATTR = 15 | |
25 | SYS_FREMOVEXATTR = 16 | |
26 | SYS_GETCWD = 17 | |
27 | SYS_LOOKUP_DCOOKIE = 18 | |
28 | SYS_EVENTFD2 = 19 | |
29 | SYS_EPOLL_CREATE1 = 20 | |
30 | SYS_EPOLL_CTL = 21 | |
31 | SYS_EPOLL_PWAIT = 22 | |
32 | SYS_DUP = 23 | |
33 | SYS_DUP3 = 24 | |
34 | SYS_FCNTL = 25 | |
35 | SYS_INOTIFY_INIT1 = 26 | |
36 | SYS_INOTIFY_ADD_WATCH = 27 | |
37 | SYS_INOTIFY_RM_WATCH = 28 | |
38 | SYS_IOCTL = 29 | |
39 | SYS_IOPRIO_SET = 30 | |
40 | SYS_IOPRIO_GET = 31 | |
41 | SYS_FLOCK = 32 | |
42 | SYS_MKNODAT = 33 | |
43 | SYS_MKDIRAT = 34 | |
44 | SYS_UNLINKAT = 35 | |
45 | SYS_SYMLINKAT = 36 | |
46 | SYS_LINKAT = 37 | |
47 | SYS_UMOUNT2 = 39 | |
48 | SYS_MOUNT = 40 | |
49 | SYS_PIVOT_ROOT = 41 | |
50 | SYS_NFSSERVCTL = 42 | |
51 | SYS_STATFS = 43 | |
52 | SYS_FSTATFS = 44 | |
53 | SYS_TRUNCATE = 45 | |
54 | SYS_FTRUNCATE = 46 | |
55 | SYS_FALLOCATE = 47 | |
56 | SYS_FACCESSAT = 48 | |
57 | SYS_CHDIR = 49 | |
58 | SYS_FCHDIR = 50 | |
59 | SYS_CHROOT = 51 | |
60 | SYS_FCHMOD = 52 | |
61 | SYS_FCHMODAT = 53 | |
62 | SYS_FCHOWNAT = 54 | |
63 | SYS_FCHOWN = 55 | |
64 | SYS_OPENAT = 56 | |
65 | SYS_CLOSE = 57 | |
66 | SYS_VHANGUP = 58 | |
67 | SYS_PIPE2 = 59 | |
68 | SYS_QUOTACTL = 60 | |
69 | SYS_GETDENTS64 = 61 | |
70 | SYS_LSEEK = 62 | |
71 | SYS_READ = 63 | |
72 | SYS_WRITE = 64 | |
73 | SYS_READV = 65 | |
74 | SYS_WRITEV = 66 | |
75 | SYS_PREAD64 = 67 | |
76 | SYS_PWRITE64 = 68 | |
77 | SYS_PREADV = 69 | |
78 | SYS_PWRITEV = 70 | |
79 | SYS_SENDFILE = 71 | |
80 | SYS_PSELECT6 = 72 | |
81 | SYS_PPOLL = 73 | |
82 | SYS_SIGNALFD4 = 74 | |
83 | SYS_VMSPLICE = 75 | |
84 | SYS_SPLICE = 76 | |
85 | SYS_TEE = 77 | |
86 | SYS_READLINKAT = 78 | |
87 | SYS_FSTATAT = 79 | |
88 | SYS_FSTAT = 80 | |
89 | SYS_SYNC = 81 | |
90 | SYS_FSYNC = 82 | |
91 | SYS_FDATASYNC = 83 | |
92 | SYS_SYNC_FILE_RANGE = 84 | |
93 | SYS_TIMERFD_CREATE = 85 | |
94 | SYS_TIMERFD_SETTIME = 86 | |
95 | SYS_TIMERFD_GETTIME = 87 | |
96 | SYS_UTIMENSAT = 88 | |
97 | SYS_ACCT = 89 | |
98 | SYS_CAPGET = 90 | |
99 | SYS_CAPSET = 91 | |
100 | SYS_PERSONALITY = 92 | |
101 | SYS_EXIT = 93 | |
102 | SYS_EXIT_GROUP = 94 | |
103 | SYS_WAITID = 95 | |
104 | SYS_SET_TID_ADDRESS = 96 | |
105 | SYS_UNSHARE = 97 | |
106 | SYS_FUTEX = 98 | |
107 | SYS_SET_ROBUST_LIST = 99 | |
108 | SYS_GET_ROBUST_LIST = 100 | |
109 | SYS_NANOSLEEP = 101 | |
110 | SYS_GETITIMER = 102 | |
111 | SYS_SETITIMER = 103 | |
112 | SYS_KEXEC_LOAD = 104 | |
113 | SYS_INIT_MODULE = 105 | |
114 | SYS_DELETE_MODULE = 106 | |
115 | SYS_TIMER_CREATE = 107 | |
116 | SYS_TIMER_GETTIME = 108 | |
117 | SYS_TIMER_GETOVERRUN = 109 | |
118 | SYS_TIMER_SETTIME = 110 | |
119 | SYS_TIMER_DELETE = 111 | |
120 | SYS_CLOCK_SETTIME = 112 | |
121 | SYS_CLOCK_GETTIME = 113 | |
122 | SYS_CLOCK_GETRES = 114 | |
123 | SYS_CLOCK_NANOSLEEP = 115 | |
124 | SYS_SYSLOG = 116 | |
125 | SYS_PTRACE = 117 | |
126 | SYS_SCHED_SETPARAM = 118 | |
127 | SYS_SCHED_SETSCHEDULER = 119 | |
128 | SYS_SCHED_GETSCHEDULER = 120 | |
129 | SYS_SCHED_GETPARAM = 121 | |
130 | SYS_SCHED_SETAFFINITY = 122 | |
131 | SYS_SCHED_GETAFFINITY = 123 | |
132 | SYS_SCHED_YIELD = 124 | |
133 | SYS_SCHED_GET_PRIORITY_MAX = 125 | |
134 | SYS_SCHED_GET_PRIORITY_MIN = 126 | |
135 | SYS_SCHED_RR_GET_INTERVAL = 127 | |
136 | SYS_RESTART_SYSCALL = 128 | |
137 | SYS_KILL = 129 | |
138 | SYS_TKILL = 130 | |
139 | SYS_TGKILL = 131 | |
140 | SYS_SIGALTSTACK = 132 | |
141 | SYS_RT_SIGSUSPEND = 133 | |
142 | SYS_RT_SIGACTION = 134 | |
143 | SYS_RT_SIGPROCMASK = 135 | |
144 | SYS_RT_SIGPENDING = 136 | |
145 | SYS_RT_SIGTIMEDWAIT = 137 | |
146 | SYS_RT_SIGQUEUEINFO = 138 | |
147 | SYS_RT_SIGRETURN = 139 | |
148 | SYS_SETPRIORITY = 140 | |
149 | SYS_GETPRIORITY = 141 | |
150 | SYS_REBOOT = 142 | |
151 | SYS_SETREGID = 143 | |
152 | SYS_SETGID = 144 | |
153 | SYS_SETREUID = 145 | |
154 | SYS_SETUID = 146 | |
155 | SYS_SETRESUID = 147 | |
156 | SYS_GETRESUID = 148 | |
157 | SYS_SETRESGID = 149 | |
158 | SYS_GETRESGID = 150 | |
159 | SYS_SETFSUID = 151 | |
160 | SYS_SETFSGID = 152 | |
161 | SYS_TIMES = 153 | |
162 | SYS_SETPGID = 154 | |
163 | SYS_GETPGID = 155 | |
164 | SYS_GETSID = 156 | |
165 | SYS_SETSID = 157 | |
166 | SYS_GETGROUPS = 158 | |
167 | SYS_SETGROUPS = 159 | |
168 | SYS_UNAME = 160 | |
169 | SYS_SETHOSTNAME = 161 | |
170 | SYS_SETDOMAINNAME = 162 | |
171 | SYS_GETRUSAGE = 165 | |
172 | SYS_UMASK = 166 | |
173 | SYS_PRCTL = 167 | |
174 | SYS_GETCPU = 168 | |
175 | SYS_GETTIMEOFDAY = 169 | |
176 | SYS_SETTIMEOFDAY = 170 | |
177 | SYS_ADJTIMEX = 171 | |
178 | SYS_GETPID = 172 | |
179 | SYS_GETPPID = 173 | |
180 | SYS_GETUID = 174 | |
181 | SYS_GETEUID = 175 | |
182 | SYS_GETGID = 176 | |
183 | SYS_GETEGID = 177 | |
184 | SYS_GETTID = 178 | |
185 | SYS_SYSINFO = 179 | |
186 | SYS_MQ_OPEN = 180 | |
187 | SYS_MQ_UNLINK = 181 | |
188 | SYS_MQ_TIMEDSEND = 182 | |
189 | SYS_MQ_TIMEDRECEIVE = 183 | |
190 | SYS_MQ_NOTIFY = 184 | |
191 | SYS_MQ_GETSETATTR = 185 | |
192 | SYS_MSGGET = 186 | |
193 | SYS_MSGCTL = 187 | |
194 | SYS_MSGRCV = 188 | |
195 | SYS_MSGSND = 189 | |
196 | SYS_SEMGET = 190 | |
197 | SYS_SEMCTL = 191 | |
198 | SYS_SEMTIMEDOP = 192 | |
199 | SYS_SEMOP = 193 | |
200 | SYS_SHMGET = 194 | |
201 | SYS_SHMCTL = 195 | |
202 | SYS_SHMAT = 196 | |
203 | SYS_SHMDT = 197 | |
204 | SYS_SOCKET = 198 | |
205 | SYS_SOCKETPAIR = 199 | |
206 | SYS_BIND = 200 | |
207 | SYS_LISTEN = 201 | |
208 | SYS_ACCEPT = 202 | |
209 | SYS_CONNECT = 203 | |
210 | SYS_GETSOCKNAME = 204 | |
211 | SYS_GETPEERNAME = 205 | |
212 | SYS_SENDTO = 206 | |
213 | SYS_RECVFROM = 207 | |
214 | SYS_SETSOCKOPT = 208 | |
215 | SYS_GETSOCKOPT = 209 | |
216 | SYS_SHUTDOWN = 210 | |
217 | SYS_SENDMSG = 211 | |
218 | SYS_RECVMSG = 212 | |
219 | SYS_READAHEAD = 213 | |
220 | SYS_BRK = 214 | |
221 | SYS_MUNMAP = 215 | |
222 | SYS_MREMAP = 216 | |
223 | SYS_ADD_KEY = 217 | |
224 | SYS_REQUEST_KEY = 218 | |
225 | SYS_KEYCTL = 219 | |
226 | SYS_CLONE = 220 | |
227 | SYS_EXECVE = 221 | |
228 | SYS_MMAP = 222 | |
229 | SYS_FADVISE64 = 223 | |
230 | SYS_SWAPON = 224 | |
231 | SYS_SWAPOFF = 225 | |
232 | SYS_MPROTECT = 226 | |
233 | SYS_MSYNC = 227 | |
234 | SYS_MLOCK = 228 | |
235 | SYS_MUNLOCK = 229 | |
236 | SYS_MLOCKALL = 230 | |
237 | SYS_MUNLOCKALL = 231 | |
238 | SYS_MINCORE = 232 | |
239 | SYS_MADVISE = 233 | |
240 | SYS_REMAP_FILE_PAGES = 234 | |
241 | SYS_MBIND = 235 | |
242 | SYS_GET_MEMPOLICY = 236 | |
243 | SYS_SET_MEMPOLICY = 237 | |
244 | SYS_MIGRATE_PAGES = 238 | |
245 | SYS_MOVE_PAGES = 239 | |
246 | SYS_RT_TGSIGQUEUEINFO = 240 | |
247 | SYS_PERF_EVENT_OPEN = 241 | |
248 | SYS_ACCEPT4 = 242 | |
249 | SYS_RECVMMSG = 243 | |
250 | SYS_ARCH_SPECIFIC_SYSCALL = 244 | |
251 | SYS_WAIT4 = 260 | |
252 | SYS_PRLIMIT64 = 261 | |
253 | SYS_FANOTIFY_INIT = 262 | |
254 | SYS_FANOTIFY_MARK = 263 | |
255 | SYS_NAME_TO_HANDLE_AT = 264 | |
256 | SYS_OPEN_BY_HANDLE_AT = 265 | |
257 | SYS_CLOCK_ADJTIME = 266 | |
258 | SYS_SYNCFS = 267 | |
259 | SYS_SETNS = 268 | |
260 | SYS_SENDMMSG = 269 | |
261 | SYS_PROCESS_VM_READV = 270 | |
262 | SYS_PROCESS_VM_WRITEV = 271 | |
263 | SYS_KCMP = 272 | |
264 | SYS_FINIT_MODULE = 273 | |
265 | SYS_SCHED_SETATTR = 274 | |
266 | SYS_SCHED_GETATTR = 275 | |
267 | SYS_RENAMEAT2 = 276 | |
268 | SYS_SECCOMP = 277 | |
269 | SYS_GETRANDOM = 278 | |
270 | SYS_MEMFD_CREATE = 279 | |
271 | SYS_BPF = 280 | |
272 | SYS_EXECVEAT = 281 | |
273 | SYS_USERFAULTFD = 282 | |
274 | SYS_MEMBARRIER = 283 | |
275 | SYS_MLOCK2 = 284 | |
276 | SYS_COPY_FILE_RANGE = 285 | |
277 | SYS_PREADV2 = 286 | |
278 | SYS_PWRITEV2 = 287 | |
279 | SYS_PKEY_MPROTECT = 288 | |
280 | SYS_PKEY_ALLOC = 289 | |
281 | SYS_PKEY_FREE = 290 | |
282 | SYS_STATX = 291 | |
283 | SYS_IO_PGETEVENTS = 292 | |
284 | SYS_RSEQ = 293 | |
285 | SYS_KEXEC_FILE_LOAD = 294 | |
286 | SYS_PIDFD_SEND_SIGNAL = 424 | |
287 | SYS_IO_URING_SETUP = 425 | |
288 | SYS_IO_URING_ENTER = 426 | |
289 | SYS_IO_URING_REGISTER = 427 | |
290 | SYS_OPEN_TREE = 428 | |
291 | SYS_MOVE_MOUNT = 429 | |
292 | SYS_FSOPEN = 430 | |
293 | SYS_FSCONFIG = 431 | |
294 | SYS_FSMOUNT = 432 | |
295 | SYS_FSPICK = 433 | |
296 | SYS_PIDFD_OPEN = 434 | |
297 | SYS_CLONE3 = 435 | |
298 | SYS_CLOSE_RANGE = 436 | |
299 | SYS_OPENAT2 = 437 | |
300 | SYS_PIDFD_GETFD = 438 | |
301 | SYS_FACCESSAT2 = 439 | |
302 | SYS_PROCESS_MADVISE = 440 | |
303 | SYS_EPOLL_PWAIT2 = 441 | |
304 | SYS_MOUNT_SETATTR = 442 | |
305 | SYS_QUOTACTL_FD = 443 | |
306 | SYS_LANDLOCK_CREATE_RULESET = 444 | |
307 | SYS_LANDLOCK_ADD_RULE = 445 | |
308 | SYS_LANDLOCK_RESTRICT_SELF = 446 | |
309 | SYS_PROCESS_MRELEASE = 448 | |
310 | SYS_FUTEX_WAITV = 449 | |
311 | SYS_SET_MEMPOLICY_HOME_NODE = 450 | |
312 | ) |
0 | // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go | |
1 | // Code generated by the command above; see README.md. DO NOT EDIT. | |
2 | ||
3 | //go:build loong64 && linux | |
4 | // +build loong64,linux | |
5 | ||
6 | package unix | |
7 | ||
8 | const ( | |
9 | SizeofPtr = 0x8 | |
10 | SizeofLong = 0x8 | |
11 | ) | |
12 | ||
13 | type ( | |
14 | _C_long int64 | |
15 | ) | |
16 | ||
17 | type Timespec struct { | |
18 | Sec int64 | |
19 | Nsec int64 | |
20 | } | |
21 | ||
22 | type Timeval struct { | |
23 | Sec int64 | |
24 | Usec int64 | |
25 | } | |
26 | ||
27 | type Timex struct { | |
28 | Modes uint32 | |
29 | Offset int64 | |
30 | Freq int64 | |
31 | Maxerror int64 | |
32 | Esterror int64 | |
33 | Status int32 | |
34 | Constant int64 | |
35 | Precision int64 | |
36 | Tolerance int64 | |
37 | Time Timeval | |
38 | Tick int64 | |
39 | Ppsfreq int64 | |
40 | Jitter int64 | |
41 | Shift int32 | |
42 | Stabil int64 | |
43 | Jitcnt int64 | |
44 | Calcnt int64 | |
45 | Errcnt int64 | |
46 | Stbcnt int64 | |
47 | Tai int32 | |
48 | _ [44]byte | |
49 | } | |
50 | ||
51 | type Time_t int64 | |
52 | ||
53 | type Tms struct { | |
54 | Utime int64 | |
55 | Stime int64 | |
56 | Cutime int64 | |
57 | Cstime int64 | |
58 | } | |
59 | ||
60 | type Utimbuf struct { | |
61 | Actime int64 | |
62 | Modtime int64 | |
63 | } | |
64 | ||
65 | type Rusage struct { | |
66 | Utime Timeval | |
67 | Stime Timeval | |
68 | Maxrss int64 | |
69 | Ixrss int64 | |
70 | Idrss int64 | |
71 | Isrss int64 | |
72 | Minflt int64 | |
73 | Majflt int64 | |
74 | Nswap int64 | |
75 | Inblock int64 | |
76 | Oublock int64 | |
77 | Msgsnd int64 | |
78 | Msgrcv int64 | |
79 | Nsignals int64 | |
80 | Nvcsw int64 | |
81 | Nivcsw int64 | |
82 | } | |
83 | ||
84 | type Stat_t struct { | |
85 | Dev uint64 | |
86 | Ino uint64 | |
87 | Mode uint32 | |
88 | Nlink uint32 | |
89 | Uid uint32 | |
90 | Gid uint32 | |
91 | Rdev uint64 | |
92 | _ uint64 | |
93 | Size int64 | |
94 | Blksize int32 | |
95 | _ int32 | |
96 | Blocks int64 | |
97 | Atim Timespec | |
98 | Mtim Timespec | |
99 | Ctim Timespec | |
100 | _ [2]int32 | |
101 | } | |
102 | ||
103 | type Dirent struct { | |
104 | Ino uint64 | |
105 | Off int64 | |
106 | Reclen uint16 | |
107 | Type uint8 | |
108 | Name [256]int8 | |
109 | _ [5]byte | |
110 | } | |
111 | ||
112 | type Flock_t struct { | |
113 | Type int16 | |
114 | Whence int16 | |
115 | Start int64 | |
116 | Len int64 | |
117 | Pid int32 | |
118 | _ [4]byte | |
119 | } | |
120 | ||
121 | type DmNameList struct { | |
122 | Dev uint64 | |
123 | Next uint32 | |
124 | Name [0]byte | |
125 | _ [4]byte | |
126 | } | |
127 | ||
128 | const ( | |
129 | FADV_DONTNEED = 0x4 | |
130 | FADV_NOREUSE = 0x5 | |
131 | ) | |
132 | ||
133 | type RawSockaddrNFCLLCP struct { | |
134 | Sa_family uint16 | |
135 | Dev_idx uint32 | |
136 | Target_idx uint32 | |
137 | Nfc_protocol uint32 | |
138 | Dsap uint8 | |
139 | Ssap uint8 | |
140 | Service_name [63]uint8 | |
141 | Service_name_len uint64 | |
142 | } | |
143 | ||
144 | type RawSockaddr struct { | |
145 | Family uint16 | |
146 | Data [14]int8 | |
147 | } | |
148 | ||
149 | type RawSockaddrAny struct { | |
150 | Addr RawSockaddr | |
151 | Pad [96]int8 | |
152 | } | |
153 | ||
154 | type Iovec struct { | |
155 | Base *byte | |
156 | Len uint64 | |
157 | } | |
158 | ||
159 | type Msghdr struct { | |
160 | Name *byte | |
161 | Namelen uint32 | |
162 | Iov *Iovec | |
163 | Iovlen uint64 | |
164 | Control *byte | |
165 | Controllen uint64 | |
166 | Flags int32 | |
167 | _ [4]byte | |
168 | } | |
169 | ||
170 | type Cmsghdr struct { | |
171 | Len uint64 | |
172 | Level int32 | |
173 | Type int32 | |
174 | } | |
175 | ||
176 | type ifreq struct { | |
177 | Ifrn [16]byte | |
178 | Ifru [24]byte | |
179 | } | |
180 | ||
181 | const ( | |
182 | SizeofSockaddrNFCLLCP = 0x60 | |
183 | SizeofIovec = 0x10 | |
184 | SizeofMsghdr = 0x38 | |
185 | SizeofCmsghdr = 0x10 | |
186 | ) | |
187 | ||
188 | const ( | |
189 | SizeofSockFprog = 0x10 | |
190 | ) | |
191 | ||
192 | type PtraceRegs struct { | |
193 | Regs [32]uint64 | |
194 | Orig_a0 uint64 | |
195 | Era uint64 | |
196 | Badv uint64 | |
197 | Reserved [10]uint64 | |
198 | } | |
199 | ||
200 | type FdSet struct { | |
201 | Bits [16]int64 | |
202 | } | |
203 | ||
204 | type Sysinfo_t struct { | |
205 | Uptime int64 | |
206 | Loads [3]uint64 | |
207 | Totalram uint64 | |
208 | Freeram uint64 | |
209 | Sharedram uint64 | |
210 | Bufferram uint64 | |
211 | Totalswap uint64 | |
212 | Freeswap uint64 | |
213 | Procs uint16 | |
214 | Pad uint16 | |
215 | Totalhigh uint64 | |
216 | Freehigh uint64 | |
217 | Unit uint32 | |
218 | _ [0]int8 | |
219 | _ [4]byte | |
220 | } | |
221 | ||
222 | type Ustat_t struct { | |
223 | Tfree int32 | |
224 | Tinode uint64 | |
225 | Fname [6]int8 | |
226 | Fpack [6]int8 | |
227 | _ [4]byte | |
228 | } | |
229 | ||
230 | type EpollEvent struct { | |
231 | Events uint32 | |
232 | _ int32 | |
233 | Fd int32 | |
234 | Pad int32 | |
235 | } | |
236 | ||
237 | const ( | |
238 | OPEN_TREE_CLOEXEC = 0x80000 | |
239 | ) | |
240 | ||
241 | const ( | |
242 | POLLRDHUP = 0x2000 | |
243 | ) | |
244 | ||
245 | type Sigset_t struct { | |
246 | Val [16]uint64 | |
247 | } | |
248 | ||
249 | const _C__NSIG = 0x41 | |
250 | ||
251 | type Siginfo struct { | |
252 | Signo int32 | |
253 | Errno int32 | |
254 | Code int32 | |
255 | _ int32 | |
256 | _ [112]byte | |
257 | } | |
258 | ||
259 | type Termios struct { | |
260 | Iflag uint32 | |
261 | Oflag uint32 | |
262 | Cflag uint32 | |
263 | Lflag uint32 | |
264 | Line uint8 | |
265 | Cc [19]uint8 | |
266 | Ispeed uint32 | |
267 | Ospeed uint32 | |
268 | } | |
269 | ||
270 | type Taskstats struct { | |
271 | Version uint16 | |
272 | Ac_exitcode uint32 | |
273 | Ac_flag uint8 | |
274 | Ac_nice uint8 | |
275 | Cpu_count uint64 | |
276 | Cpu_delay_total uint64 | |
277 | Blkio_count uint64 | |
278 | Blkio_delay_total uint64 | |
279 | Swapin_count uint64 | |
280 | Swapin_delay_total uint64 | |
281 | Cpu_run_real_total uint64 | |
282 | Cpu_run_virtual_total uint64 | |
283 | Ac_comm [32]int8 | |
284 | Ac_sched uint8 | |
285 | Ac_pad [3]uint8 | |
286 | _ [4]byte | |
287 | Ac_uid uint32 | |
288 | Ac_gid uint32 | |
289 | Ac_pid uint32 | |
290 | Ac_ppid uint32 | |
291 | Ac_btime uint32 | |
292 | Ac_etime uint64 | |
293 | Ac_utime uint64 | |
294 | Ac_stime uint64 | |
295 | Ac_minflt uint64 | |
296 | Ac_majflt uint64 | |
297 | Coremem uint64 | |
298 | Virtmem uint64 | |
299 | Hiwater_rss uint64 | |
300 | Hiwater_vm uint64 | |
301 | Read_char uint64 | |
302 | Write_char uint64 | |
303 | Read_syscalls uint64 | |
304 | Write_syscalls uint64 | |
305 | Read_bytes uint64 | |
306 | Write_bytes uint64 | |
307 | Cancelled_write_bytes uint64 | |
308 | Nvcsw uint64 | |
309 | Nivcsw uint64 | |
310 | Ac_utimescaled uint64 | |
311 | Ac_stimescaled uint64 | |
312 | Cpu_scaled_run_real_total uint64 | |
313 | Freepages_count uint64 | |
314 | Freepages_delay_total uint64 | |
315 | Thrashing_count uint64 | |
316 | Thrashing_delay_total uint64 | |
317 | Ac_btime64 uint64 | |
318 | Compact_count uint64 | |
319 | Compact_delay_total uint64 | |
320 | } | |
321 | ||
322 | type cpuMask uint64 | |
323 | ||
324 | const ( | |
325 | _NCPUBITS = 0x40 | |
326 | ) | |
327 | ||
328 | const ( | |
329 | CBitFieldMaskBit0 = 0x1 | |
330 | CBitFieldMaskBit1 = 0x2 | |
331 | CBitFieldMaskBit2 = 0x4 | |
332 | CBitFieldMaskBit3 = 0x8 | |
333 | CBitFieldMaskBit4 = 0x10 | |
334 | CBitFieldMaskBit5 = 0x20 | |
335 | CBitFieldMaskBit6 = 0x40 | |
336 | CBitFieldMaskBit7 = 0x80 | |
337 | CBitFieldMaskBit8 = 0x100 | |
338 | CBitFieldMaskBit9 = 0x200 | |
339 | CBitFieldMaskBit10 = 0x400 | |
340 | CBitFieldMaskBit11 = 0x800 | |
341 | CBitFieldMaskBit12 = 0x1000 | |
342 | CBitFieldMaskBit13 = 0x2000 | |
343 | CBitFieldMaskBit14 = 0x4000 | |
344 | CBitFieldMaskBit15 = 0x8000 | |
345 | CBitFieldMaskBit16 = 0x10000 | |
346 | CBitFieldMaskBit17 = 0x20000 | |
347 | CBitFieldMaskBit18 = 0x40000 | |
348 | CBitFieldMaskBit19 = 0x80000 | |
349 | CBitFieldMaskBit20 = 0x100000 | |
350 | CBitFieldMaskBit21 = 0x200000 | |
351 | CBitFieldMaskBit22 = 0x400000 | |
352 | CBitFieldMaskBit23 = 0x800000 | |
353 | CBitFieldMaskBit24 = 0x1000000 | |
354 | CBitFieldMaskBit25 = 0x2000000 | |
355 | CBitFieldMaskBit26 = 0x4000000 | |
356 | CBitFieldMaskBit27 = 0x8000000 | |
357 | CBitFieldMaskBit28 = 0x10000000 | |
358 | CBitFieldMaskBit29 = 0x20000000 | |
359 | CBitFieldMaskBit30 = 0x40000000 | |
360 | CBitFieldMaskBit31 = 0x80000000 | |
361 | CBitFieldMaskBit32 = 0x100000000 | |
362 | CBitFieldMaskBit33 = 0x200000000 | |
363 | CBitFieldMaskBit34 = 0x400000000 | |
364 | CBitFieldMaskBit35 = 0x800000000 | |
365 | CBitFieldMaskBit36 = 0x1000000000 | |
366 | CBitFieldMaskBit37 = 0x2000000000 | |
367 | CBitFieldMaskBit38 = 0x4000000000 | |
368 | CBitFieldMaskBit39 = 0x8000000000 | |
369 | CBitFieldMaskBit40 = 0x10000000000 | |
370 | CBitFieldMaskBit41 = 0x20000000000 | |
371 | CBitFieldMaskBit42 = 0x40000000000 | |
372 | CBitFieldMaskBit43 = 0x80000000000 | |
373 | CBitFieldMaskBit44 = 0x100000000000 | |
374 | CBitFieldMaskBit45 = 0x200000000000 | |
375 | CBitFieldMaskBit46 = 0x400000000000 | |
376 | CBitFieldMaskBit47 = 0x800000000000 | |
377 | CBitFieldMaskBit48 = 0x1000000000000 | |
378 | CBitFieldMaskBit49 = 0x2000000000000 | |
379 | CBitFieldMaskBit50 = 0x4000000000000 | |
380 | CBitFieldMaskBit51 = 0x8000000000000 | |
381 | CBitFieldMaskBit52 = 0x10000000000000 | |
382 | CBitFieldMaskBit53 = 0x20000000000000 | |
383 | CBitFieldMaskBit54 = 0x40000000000000 | |
384 | CBitFieldMaskBit55 = 0x80000000000000 | |
385 | CBitFieldMaskBit56 = 0x100000000000000 | |
386 | CBitFieldMaskBit57 = 0x200000000000000 | |
387 | CBitFieldMaskBit58 = 0x400000000000000 | |
388 | CBitFieldMaskBit59 = 0x800000000000000 | |
389 | CBitFieldMaskBit60 = 0x1000000000000000 | |
390 | CBitFieldMaskBit61 = 0x2000000000000000 | |
391 | CBitFieldMaskBit62 = 0x4000000000000000 | |
392 | CBitFieldMaskBit63 = 0x8000000000000000 | |
393 | ) | |
394 | ||
395 | type SockaddrStorage struct { | |
396 | Family uint16 | |
397 | _ [118]int8 | |
398 | _ uint64 | |
399 | } | |
400 | ||
401 | type HDGeometry struct { | |
402 | Heads uint8 | |
403 | Sectors uint8 | |
404 | Cylinders uint16 | |
405 | Start uint64 | |
406 | } | |
407 | ||
408 | type Statfs_t struct { | |
409 | Type int64 | |
410 | Bsize int64 | |
411 | Blocks uint64 | |
412 | Bfree uint64 | |
413 | Bavail uint64 | |
414 | Files uint64 | |
415 | Ffree uint64 | |
416 | Fsid Fsid | |
417 | Namelen int64 | |
418 | Frsize int64 | |
419 | Flags int64 | |
420 | Spare [4]int64 | |
421 | } | |
422 | ||
423 | type TpacketHdr struct { | |
424 | Status uint64 | |
425 | Len uint32 | |
426 | Snaplen uint32 | |
427 | Mac uint16 | |
428 | Net uint16 | |
429 | Sec uint32 | |
430 | Usec uint32 | |
431 | _ [4]byte | |
432 | } | |
433 | ||
434 | const ( | |
435 | SizeofTpacketHdr = 0x20 | |
436 | ) | |
437 | ||
438 | type RTCPLLInfo struct { | |
439 | Ctrl int32 | |
440 | Value int32 | |
441 | Max int32 | |
442 | Min int32 | |
443 | Posmult int32 | |
444 | Negmult int32 | |
445 | Clock int64 | |
446 | } | |
447 | ||
448 | type BlkpgPartition struct { | |
449 | Start int64 | |
450 | Length int64 | |
451 | Pno int32 | |
452 | Devname [64]uint8 | |
453 | Volname [64]uint8 | |
454 | _ [4]byte | |
455 | } | |
456 | ||
457 | const ( | |
458 | BLKPG = 0x1269 | |
459 | ) | |
460 | ||
461 | type XDPUmemReg struct { | |
462 | Addr uint64 | |
463 | Len uint64 | |
464 | Size uint32 | |
465 | Headroom uint32 | |
466 | Flags uint32 | |
467 | _ [4]byte | |
468 | } | |
469 | ||
470 | type CryptoUserAlg struct { | |
471 | Name [64]int8 | |
472 | Driver_name [64]int8 | |
473 | Module_name [64]int8 | |
474 | Type uint32 | |
475 | Mask uint32 | |
476 | Refcnt uint32 | |
477 | Flags uint32 | |
478 | } | |
479 | ||
480 | type CryptoStatAEAD struct { | |
481 | Type [64]int8 | |
482 | Encrypt_cnt uint64 | |
483 | Encrypt_tlen uint64 | |
484 | Decrypt_cnt uint64 | |
485 | Decrypt_tlen uint64 | |
486 | Err_cnt uint64 | |
487 | } | |
488 | ||
489 | type CryptoStatAKCipher struct { | |
490 | Type [64]int8 | |
491 | Encrypt_cnt uint64 | |
492 | Encrypt_tlen uint64 | |
493 | Decrypt_cnt uint64 | |
494 | Decrypt_tlen uint64 | |
495 | Verify_cnt uint64 | |
496 | Sign_cnt uint64 | |
497 | Err_cnt uint64 | |
498 | } | |
499 | ||
500 | type CryptoStatCipher struct { | |
501 | Type [64]int8 | |
502 | Encrypt_cnt uint64 | |
503 | Encrypt_tlen uint64 | |
504 | Decrypt_cnt uint64 | |
505 | Decrypt_tlen uint64 | |
506 | Err_cnt uint64 | |
507 | } | |
508 | ||
509 | type CryptoStatCompress struct { | |
510 | Type [64]int8 | |
511 | Compress_cnt uint64 | |
512 | Compress_tlen uint64 | |
513 | Decompress_cnt uint64 | |
514 | Decompress_tlen uint64 | |
515 | Err_cnt uint64 | |
516 | } | |
517 | ||
518 | type CryptoStatHash struct { | |
519 | Type [64]int8 | |
520 | Hash_cnt uint64 | |
521 | Hash_tlen uint64 | |
522 | Err_cnt uint64 | |
523 | } | |
524 | ||
525 | type CryptoStatKPP struct { | |
526 | Type [64]int8 | |
527 | Setsecret_cnt uint64 | |
528 | Generate_public_key_cnt uint64 | |
529 | Compute_shared_secret_cnt uint64 | |
530 | Err_cnt uint64 | |
531 | } | |
532 | ||
533 | type CryptoStatRNG struct { | |
534 | Type [64]int8 | |
535 | Generate_cnt uint64 | |
536 | Generate_tlen uint64 | |
537 | Seed_cnt uint64 | |
538 | Err_cnt uint64 | |
539 | } | |
540 | ||
541 | type CryptoStatLarval struct { | |
542 | Type [64]int8 | |
543 | } | |
544 | ||
545 | type CryptoReportLarval struct { | |
546 | Type [64]int8 | |
547 | } | |
548 | ||
549 | type CryptoReportHash struct { | |
550 | Type [64]int8 | |
551 | Blocksize uint32 | |
552 | Digestsize uint32 | |
553 | } | |
554 | ||
555 | type CryptoReportCipher struct { | |
556 | Type [64]int8 | |
557 | Blocksize uint32 | |
558 | Min_keysize uint32 | |
559 | Max_keysize uint32 | |
560 | } | |
561 | ||
562 | type CryptoReportBlkCipher struct { | |
563 | Type [64]int8 | |
564 | Geniv [64]int8 | |
565 | Blocksize uint32 | |
566 | Min_keysize uint32 | |
567 | Max_keysize uint32 | |
568 | Ivsize uint32 | |
569 | } | |
570 | ||
571 | type CryptoReportAEAD struct { | |
572 | Type [64]int8 | |
573 | Geniv [64]int8 | |
574 | Blocksize uint32 | |
575 | Maxauthsize uint32 | |
576 | Ivsize uint32 | |
577 | } | |
578 | ||
579 | type CryptoReportComp struct { | |
580 | Type [64]int8 | |
581 | } | |
582 | ||
583 | type CryptoReportRNG struct { | |
584 | Type [64]int8 | |
585 | Seedsize uint32 | |
586 | } | |
587 | ||
588 | type CryptoReportAKCipher struct { | |
589 | Type [64]int8 | |
590 | } | |
591 | ||
592 | type CryptoReportKPP struct { | |
593 | Type [64]int8 | |
594 | } | |
595 | ||
596 | type CryptoReportAcomp struct { | |
597 | Type [64]int8 | |
598 | } | |
599 | ||
600 | type LoopInfo struct { | |
601 | Number int32 | |
602 | Device uint32 | |
603 | Inode uint64 | |
604 | Rdevice uint32 | |
605 | Offset int32 | |
606 | Encrypt_type int32 | |
607 | Encrypt_key_size int32 | |
608 | Flags int32 | |
609 | Name [64]int8 | |
610 | Encrypt_key [32]uint8 | |
611 | Init [2]uint64 | |
612 | Reserved [4]int8 | |
613 | _ [4]byte | |
614 | } | |
615 | ||
616 | type TIPCSubscr struct { | |
617 | Seq TIPCServiceRange | |
618 | Timeout uint32 | |
619 | Filter uint32 | |
620 | Handle [8]int8 | |
621 | } | |
622 | ||
623 | type TIPCSIOCLNReq struct { | |
624 | Peer uint32 | |
625 | Id uint32 | |
626 | Linkname [68]int8 | |
627 | } | |
628 | ||
629 | type TIPCSIOCNodeIDReq struct { | |
630 | Peer uint32 | |
631 | Id [16]int8 | |
632 | } | |
633 | ||
634 | type PPSKInfo struct { | |
635 | Assert_sequence uint32 | |
636 | Clear_sequence uint32 | |
637 | Assert_tu PPSKTime | |
638 | Clear_tu PPSKTime | |
639 | Current_mode int32 | |
640 | _ [4]byte | |
641 | } | |
642 | ||
643 | const ( | |
644 | PPS_GETPARAMS = 0x800870a1 | |
645 | PPS_SETPARAMS = 0x400870a2 | |
646 | PPS_GETCAP = 0x800870a3 | |
647 | PPS_FETCH = 0xc00870a4 | |
648 | ) | |
649 | ||
650 | const ( | |
651 | PIDFD_NONBLOCK = 0x800 | |
652 | ) | |
653 | ||
654 | type SysvIpcPerm struct { | |
655 | Key int32 | |
656 | Uid uint32 | |
657 | Gid uint32 | |
658 | Cuid uint32 | |
659 | Cgid uint32 | |
660 | Mode uint32 | |
661 | _ [0]uint8 | |
662 | Seq uint16 | |
663 | _ uint16 | |
664 | _ uint64 | |
665 | _ uint64 | |
666 | } | |
667 | type SysvShmDesc struct { | |
668 | Perm SysvIpcPerm | |
669 | Segsz uint64 | |
670 | Atime int64 | |
671 | Dtime int64 | |
672 | Ctime int64 | |
673 | Cpid int32 | |
674 | Lpid int32 | |
675 | Nattch uint64 | |
676 | _ uint64 | |
677 | _ uint64 | |
678 | } |