Merge pull request #3601 from thaJeztah/20.10_bump_golang_1.17.10

[20.10] update golang to 1.17.10, golang.org/x/sys v0.0.0-20220412211240-33da011f77ad
This commit is contained in:
Sebastiaan van Stijn 2022-05-11 18:22:17 +02:00 committed by GitHub
commit aa7e414fdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
175 changed files with 9845 additions and 5885 deletions

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1.3 # syntax=docker/dockerfile:1.3
ARG BASE_VARIANT=alpine ARG BASE_VARIANT=alpine
ARG GO_VERSION=1.17.9 ARG GO_VERSION=1.17.10
ARG XX_VERSION=1.1.0 ARG XX_VERSION=1.1.0
FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx

View File

@ -4,7 +4,7 @@ clone_folder: c:\gopath\src\github.com\docker\cli
environment: environment:
GOPATH: c:\gopath GOPATH: c:\gopath
GOVERSION: 1.17.9 GOVERSION: 1.17.10
DEPVERSION: v0.4.1 DEPVERSION: v0.4.1
install: install:

View File

@ -1,5 +1,5 @@
variable "GO_VERSION" { variable "GO_VERSION" {
default = "1.17.9" default = "1.17.10"
} }
variable "VERSION" { variable "VERSION" {
default = "" default = ""

View File

@ -1,4 +1,4 @@
ARG GO_VERSION=1.17.9 ARG GO_VERSION=1.17.10
FROM golang:${GO_VERSION}-alpine FROM golang:${GO_VERSION}-alpine

View File

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1.3 # syntax=docker/dockerfile:1.3
ARG GO_VERSION=1.17.9 ARG GO_VERSION=1.17.10
FROM golang:${GO_VERSION}-alpine AS golang FROM golang:${GO_VERSION}-alpine AS golang
ENV CGO_ENABLED=0 ENV CGO_ENABLED=0

View File

@ -1,4 +1,4 @@
ARG GO_VERSION=1.17.9 ARG GO_VERSION=1.17.10
# Use Debian based image as docker-compose requires glibc. # Use Debian based image as docker-compose requires glibc.
FROM golang:${GO_VERSION}-buster FROM golang:${GO_VERSION}-buster

View File

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1.3 # syntax=docker/dockerfile:1.3
ARG GO_VERSION=1.17.9 ARG GO_VERSION=1.17.10
ARG GOLANGCI_LINTER_SHA="v1.21.0" ARG GOLANGCI_LINTER_SHA="v1.21.0"
FROM golang:${GO_VERSION}-alpine AS build FROM golang:${GO_VERSION}-alpine AS build

View File

@ -77,7 +77,7 @@ golang.org/x/crypto c1f2f97bffc9c53fc40a1a28a5b4
golang.org/x/net ab34263943818b32f575efc978a3d24e80b04bd7 golang.org/x/net ab34263943818b32f575efc978a3d24e80b04bd7
golang.org/x/oauth2 bf48bf16ab8d622ce64ec6ce98d2c98f916b6303 golang.org/x/oauth2 bf48bf16ab8d622ce64ec6ce98d2c98f916b6303
golang.org/x/sync cd5d95a43a6e21273425c7ae415d3df9ea832eeb golang.org/x/sync cd5d95a43a6e21273425c7ae415d3df9ea832eeb
golang.org/x/sys 63515b42dcdf9544f4e6a02fd7632793fde2f72d golang.org/x/sys 33da011f77ade50ff5b6a6fb4a9a1e6d6b285809
golang.org/x/term f5c789dd3221ff39d752ac54467d762de7cfbec6 golang.org/x/term f5c789dd3221ff39d752ac54467d762de7cfbec6
golang.org/x/text 23ae387dee1f90d29a23c0e87ee0b46038fbed0e # v0.3.3 golang.org/x/text 23ae387dee1f90d29a23c0e87ee0b46038fbed0e # v0.3.3
golang.org/x/time 555d28b269f0569763d25dbe1a237ae74c6bcc82 golang.org/x/time 555d28b269f0569763d25dbe1a237ae74c6bcc82

View File

@ -46,6 +46,7 @@ func hostByteOrder() byteOrder {
case "386", "amd64", "amd64p32", case "386", "amd64", "amd64p32",
"alpha", "alpha",
"arm", "arm64", "arm", "arm64",
"loong64",
"mipsle", "mips64le", "mips64p32le", "mipsle", "mips64le", "mips64p32le",
"nios2", "nios2",
"ppc64le", "ppc64le",

View File

@ -15,7 +15,3 @@ func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32)
// xgetbv with ecx = 0 is implemented in cpu_x86.s for gc compiler // xgetbv with ecx = 0 is implemented in cpu_x86.s for gc compiler
// and in cpu_gccgo.c for gccgo. // and in cpu_gccgo.c for gccgo.
func xgetbv() (eax, edx uint32) func xgetbv() (eax, edx uint32)
// darwinSupportsAVX512 is implemented in cpu_x86.s for gc compiler
// and in cpu_gccgo_x86.go for gccgo.
func darwinSupportsAVX512() bool

13
vendor/golang.org/x/sys/cpu/cpu_loong64.go generated vendored Normal file
View File

@ -0,0 +1,13 @@
// Copyright 2022 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build loong64
// +build loong64
package cpu
const cacheLineSize = 64
func initOptions() {
}

View File

@ -90,9 +90,10 @@ func archInit() {
osSupportsAVX = isSet(1, eax) && isSet(2, eax) osSupportsAVX = isSet(1, eax) && isSet(2, eax)
if runtime.GOOS == "darwin" { if runtime.GOOS == "darwin" {
// Check darwin commpage for AVX512 support. Necessary because: // Darwin doesn't save/restore AVX-512 mask registers correctly across signal handlers.
// https://github.com/apple/darwin-xnu/blob/0a798f6738bc1db01281fc08ae024145e84df927/osfmk/i386/fpu.c#L175-L201 // Since users can't rely on mask register contents, let's not advertise AVX-512 support.
osSupportsAVX512 = osSupportsAVX && darwinSupportsAVX512() // See issue 49233.
osSupportsAVX512 = false
} else { } else {
// Check if OPMASK and ZMM registers have OS support. // Check if OPMASK and ZMM registers have OS support.
osSupportsAVX512 = osSupportsAVX && isSet(5, eax) && isSet(6, eax) && isSet(7, eax) osSupportsAVX512 = osSupportsAVX && isSet(5, eax) && isSet(6, eax) && isSet(7, eax)

View File

@ -26,27 +26,3 @@ TEXT ·xgetbv(SB),NOSPLIT,$0-8
MOVL AX, eax+0(FP) MOVL AX, eax+0(FP)
MOVL DX, edx+4(FP) MOVL DX, edx+4(FP)
RET RET
// func darwinSupportsAVX512() bool
TEXT ·darwinSupportsAVX512(SB), NOSPLIT, $0-1
MOVB $0, ret+0(FP) // default to false
#ifdef GOOS_darwin // return if not darwin
#ifdef GOARCH_amd64 // return if not amd64
// These values from:
// https://github.com/apple/darwin-xnu/blob/xnu-4570.1.46/osfmk/i386/cpu_capabilities.h
#define commpage64_base_address 0x00007fffffe00000
#define commpage64_cpu_capabilities64 (commpage64_base_address+0x010)
#define commpage64_version (commpage64_base_address+0x01E)
#define hasAVX512F 0x0000004000000000
MOVQ $commpage64_version, BX
CMPW (BX), $13 // cpu_capabilities64 undefined in versions < 13
JL no_avx512
MOVQ $commpage64_cpu_capabilities64, BX
MOVQ $hasAVX512F, CX
TESTQ (BX), CX
JZ no_avx512
MOVB $1, ret+0(FP)
no_avx512:
#endif
#endif
RET

View File

@ -5,7 +5,7 @@
// Recreate a getsystemcfg syscall handler instead of // Recreate a getsystemcfg syscall handler instead of
// using the one provided by x/sys/unix to avoid having // using the one provided by x/sys/unix to avoid having
// the dependency between them. (See golang.org/issue/32102) // the dependency between them. (See golang.org/issue/32102)
// Morever, this file will be used during the building of // Moreover, this file will be used during the building of
// gccgo's libgo and thus must not used a CGo method. // gccgo's libgo and thus must not used a CGo method.
//go:build aix && gccgo //go:build aix && gccgo

View File

@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//go:build go1.5
// +build go1.5 // +build go1.5
package plan9 package plan9

View File

@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//go:build !go1.5
// +build !go1.5 // +build !go1.5
package plan9 package plan9

View File

@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//go:build plan9 && race
// +build plan9,race // +build plan9,race
package plan9 package plan9

View File

@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//go:build plan9 && !race
// +build plan9,!race // +build plan9,!race
package plan9 package plan9

View File

@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//go:build plan9
// +build plan9 // +build plan9
package plan9 package plan9

View File

@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//go:build plan9
// +build plan9 // +build plan9
// Package plan9 contains an interface to the low-level operating system // Package plan9 contains an interface to the low-level operating system

View File

@ -132,8 +132,10 @@ func Pipe(p []int) (err error) {
} }
var pp [2]int32 var pp [2]int32
err = pipe(&pp) err = pipe(&pp)
p[0] = int(pp[0]) if err == nil {
p[1] = int(pp[1]) p[0] = int(pp[0])
p[1] = int(pp[1])
}
return return
} }

View File

@ -1,6 +1,7 @@
// go run mksyscall.go -l32 -plan9 -tags plan9,386 syscall_plan9.go // go run mksyscall.go -l32 -plan9 -tags plan9,386 syscall_plan9.go
// Code generated by the command above; see README.md. DO NOT EDIT. // Code generated by the command above; see README.md. DO NOT EDIT.
//go:build plan9 && 386
// +build plan9,386 // +build plan9,386
package plan9 package plan9

View File

@ -1,6 +1,7 @@
// go run mksyscall.go -l32 -plan9 -tags plan9,amd64 syscall_plan9.go // go run mksyscall.go -l32 -plan9 -tags plan9,amd64 syscall_plan9.go
// Code generated by the command above; see README.md. DO NOT EDIT. // Code generated by the command above; see README.md. DO NOT EDIT.
//go:build plan9 && amd64
// +build plan9,amd64 // +build plan9,amd64
package plan9 package plan9

View File

@ -1,6 +1,7 @@
// go run mksyscall.go -l32 -plan9 -tags plan9,arm syscall_plan9.go // go run mksyscall.go -l32 -plan9 -tags plan9,arm syscall_plan9.go
// Code generated by the command above; see README.md. DO NOT EDIT. // Code generated by the command above; see README.md. DO NOT EDIT.
//go:build plan9 && arm
// +build plan9,arm // +build plan9,arm
package plan9 package plan9

View File

@ -149,7 +149,7 @@ To add a constant, add the header that includes it to the appropriate variable.
Then, edit the regex (if necessary) to match the desired constant. Avoid making Then, edit the regex (if necessary) to match the desired constant. Avoid making
the regex too broad to avoid matching unintended constants. the regex too broad to avoid matching unintended constants.
### mkmerge.go ### internal/mkmerge
This program is used to extract duplicate const, func, and type declarations This program is used to extract duplicate const, func, and type declarations
from the generated architecture-specific files listed below, and merge these from the generated architecture-specific files listed below, and merge these

54
vendor/golang.org/x/sys/unix/asm_linux_loong64.s generated vendored Normal file
View File

@ -0,0 +1,54 @@
// Copyright 2022 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build linux && loong64 && gc
// +build linux
// +build loong64
// +build gc
#include "textflag.h"
// Just jump to package syscall's implementation for all these functions.
// The runtime may know about them.
TEXT ·Syscall(SB),NOSPLIT,$0-56
JMP syscall·Syscall(SB)
TEXT ·Syscall6(SB),NOSPLIT,$0-80
JMP syscall·Syscall6(SB)
TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
JAL runtime·entersyscall(SB)
MOVV a1+8(FP), R4
MOVV a2+16(FP), R5
MOVV a3+24(FP), R6
MOVV R0, R7
MOVV R0, R8
MOVV R0, R9
MOVV trap+0(FP), R11 // syscall entry
SYSCALL
MOVV R4, r1+32(FP)
MOVV R5, r2+40(FP)
JAL runtime·exitsyscall(SB)
RET
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
JMP syscall·RawSyscall(SB)
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
JMP syscall·RawSyscall6(SB)
TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
MOVV a1+8(FP), R4
MOVV a2+16(FP), R5
MOVV a3+24(FP), R6
MOVV R0, R7
MOVV R0, R8
MOVV R0, R9
MOVV trap+0(FP), R11 // syscall entry
SYSCALL
MOVV R4, r1+32(FP)
MOVV R5, r2+40(FP)
RET

View File

@ -194,3 +194,26 @@ func ioctlIfreqData(fd int, req uint, value *ifreqData) error {
// identical so pass *IfreqData directly. // identical so pass *IfreqData directly.
return ioctlPtr(fd, req, unsafe.Pointer(value)) return ioctlPtr(fd, req, unsafe.Pointer(value))
} }
// IoctlKCMClone attaches a new file descriptor to a multiplexor by cloning an
// existing KCM socket, returning a structure containing the file descriptor of
// the new socket.
func IoctlKCMClone(fd int) (*KCMClone, error) {
var info KCMClone
if err := ioctlPtr(fd, SIOCKCMCLONE, unsafe.Pointer(&info)); err != nil {
return nil, err
}
return &info, nil
}
// IoctlKCMAttach attaches a TCP socket and associated BPF program file
// descriptor to a multiplexor.
func IoctlKCMAttach(fd int, info KCMAttach) error {
return ioctlPtr(fd, SIOCKCMATTACH, unsafe.Pointer(&info))
}
// IoctlKCMUnattach unattaches a TCP socket file descriptor from a multiplexor.
func IoctlKCMUnattach(fd int, info KCMUnattach) error {
return ioctlPtr(fd, SIOCKCMUNATTACH, unsafe.Pointer(&info))
}

View File

@ -34,3 +34,52 @@ func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) {
ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0])) ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0]))
return &ucred, nil return &ucred, nil
} }
// PktInfo4 encodes Inet4Pktinfo into a socket control message of type IP_PKTINFO.
func PktInfo4(info *Inet4Pktinfo) []byte {
b := make([]byte, CmsgSpace(SizeofInet4Pktinfo))
h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
h.Level = SOL_IP
h.Type = IP_PKTINFO
h.SetLen(CmsgLen(SizeofInet4Pktinfo))
*(*Inet4Pktinfo)(h.data(0)) = *info
return b
}
// PktInfo6 encodes Inet6Pktinfo into a socket control message of type IPV6_PKTINFO.
func PktInfo6(info *Inet6Pktinfo) []byte {
b := make([]byte, CmsgSpace(SizeofInet6Pktinfo))
h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
h.Level = SOL_IPV6
h.Type = IPV6_PKTINFO
h.SetLen(CmsgLen(SizeofInet6Pktinfo))
*(*Inet6Pktinfo)(h.data(0)) = *info
return b
}
// ParseOrigDstAddr decodes a socket control message containing the original
// destination address. To receive such a message the IP_RECVORIGDSTADDR or
// IPV6_RECVORIGDSTADDR option must be enabled on the socket.
func ParseOrigDstAddr(m *SocketControlMessage) (Sockaddr, error) {
switch {
case m.Header.Level == SOL_IP && m.Header.Type == IP_ORIGDSTADDR:
pp := (*RawSockaddrInet4)(unsafe.Pointer(&m.Data[0]))
sa := new(SockaddrInet4)
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1])
sa.Addr = pp.Addr
return sa, nil
case m.Header.Level == SOL_IPV6 && m.Header.Type == IPV6_ORIGDSTADDR:
pp := (*RawSockaddrInet6)(unsafe.Pointer(&m.Data[0]))
sa := new(SockaddrInet6)
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1])
sa.ZoneId = pp.Scope_id
sa.Addr = pp.Addr
return sa, nil
default:
return nil, EINVAL
}
}

View File

@ -70,9 +70,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port)) p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
p[0] = byte(sa.Port >> 8) p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port) p[1] = byte(sa.Port)
for i := 0; i < len(sa.Addr); i++ { sa.raw.Addr = sa.Addr
sa.raw.Addr[i] = sa.Addr[i]
}
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
} }
@ -85,9 +83,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
p[0] = byte(sa.Port >> 8) p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port) p[1] = byte(sa.Port)
sa.raw.Scope_id = sa.ZoneId sa.raw.Scope_id = sa.ZoneId
for i := 0; i < len(sa.Addr); i++ { sa.raw.Addr = sa.Addr
sa.raw.Addr[i] = sa.Addr[i]
}
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
} }
@ -219,18 +215,12 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) {
return return
} }
func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) { func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
// Recvmsg not implemented on AIX // Recvmsg not implemented on AIX
sa := new(SockaddrUnix) return -1, -1, -1, ENOSYS
return -1, -1, -1, sa, ENOSYS
} }
func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) { func sendmsgN(fd int, p, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
_, err = SendmsgN(fd, p, oob, to, flags)
return
}
func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
// SendmsgN not implemented on AIX // SendmsgN not implemented on AIX
return -1, ENOSYS return -1, ENOSYS
} }
@ -261,9 +251,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
sa := new(SockaddrInet4) sa := new(SockaddrInet4)
p := (*[2]byte)(unsafe.Pointer(&pp.Port)) p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1]) sa.Port = int(p[0])<<8 + int(p[1])
for i := 0; i < len(sa.Addr); i++ { sa.Addr = pp.Addr
sa.Addr[i] = pp.Addr[i]
}
return sa, nil return sa, nil
case AF_INET6: case AF_INET6:
@ -272,9 +260,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
p := (*[2]byte)(unsafe.Pointer(&pp.Port)) p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1]) sa.Port = int(p[0])<<8 + int(p[1])
sa.ZoneId = pp.Scope_id sa.ZoneId = pp.Scope_id
for i := 0; i < len(sa.Addr); i++ { sa.Addr = pp.Addr
sa.Addr[i] = pp.Addr[i]
}
return sa, nil return sa, nil
} }
return nil, EAFNOSUPPORT return nil, EAFNOSUPPORT
@ -385,6 +371,11 @@ func (w WaitStatus) TrapCause() int { return -1 }
//sys fcntl(fd int, cmd int, arg int) (val int, err error) //sys fcntl(fd int, cmd int, arg int) (val int, err error)
//sys fsyncRange(fd int, how int, start int64, length int64) (err error) = fsync_range
func Fsync(fd int) error {
return fsyncRange(fd, O_SYNC, 0, 0)
}
/* /*
* Direct access * Direct access
*/ */
@ -401,7 +392,6 @@ func (w WaitStatus) TrapCause() int { return -1 }
//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) //sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) //sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
//sys Fdatasync(fd int) (err error) //sys Fdatasync(fd int) (err error)
//sys Fsync(fd int) (err error)
// readdir_r // readdir_r
//sysnb Getpgid(pid int) (pgid int, err error) //sysnb Getpgid(pid int) (pgid int, err error)
@ -462,8 +452,8 @@ func (w WaitStatus) TrapCause() int { return -1 }
//sys Listen(s int, n int) (err error) //sys Listen(s int, n int) (err error)
//sys lstat(path string, stat *Stat_t) (err error) //sys lstat(path string, stat *Stat_t) (err error)
//sys Pause() (err error) //sys Pause() (err error)
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = pread64 //sys pread(fd int, p []byte, offset int64) (n int, err error) = pread64
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = pwrite64 //sys pwrite(fd int, p []byte, offset int64) (n int, err error) = pwrite64
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
//sys Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) //sys Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
//sysnb Setregid(rgid int, egid int) (err error) //sysnb Setregid(rgid int, egid int) (err error)
@ -523,8 +513,10 @@ func Pipe(p []int) (err error) {
} }
var pp [2]_C_int var pp [2]_C_int
err = pipe(&pp) err = pipe(&pp)
p[0] = int(pp[0]) if err == nil {
p[1] = int(pp[1]) p[0] = int(pp[0])
p[1] = int(pp[1])
}
return return
} }

View File

@ -163,9 +163,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port)) p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
p[0] = byte(sa.Port >> 8) p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port) p[1] = byte(sa.Port)
for i := 0; i < len(sa.Addr); i++ { sa.raw.Addr = sa.Addr
sa.raw.Addr[i] = sa.Addr[i]
}
return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
} }
@ -179,9 +177,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
p[0] = byte(sa.Port >> 8) p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port) p[1] = byte(sa.Port)
sa.raw.Scope_id = sa.ZoneId sa.raw.Scope_id = sa.ZoneId
for i := 0; i < len(sa.Addr); i++ { sa.raw.Addr = sa.Addr
sa.raw.Addr[i] = sa.Addr[i]
}
return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
} }
@ -210,9 +206,7 @@ func (sa *SockaddrDatalink) sockaddr() (unsafe.Pointer, _Socklen, error) {
sa.raw.Nlen = sa.Nlen sa.raw.Nlen = sa.Nlen
sa.raw.Alen = sa.Alen sa.raw.Alen = sa.Alen
sa.raw.Slen = sa.Slen sa.raw.Slen = sa.Slen
for i := 0; i < len(sa.raw.Data); i++ { sa.raw.Data = sa.Data
sa.raw.Data[i] = sa.Data[i]
}
return unsafe.Pointer(&sa.raw), SizeofSockaddrDatalink, nil return unsafe.Pointer(&sa.raw), SizeofSockaddrDatalink, nil
} }
@ -228,9 +222,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
sa.Nlen = pp.Nlen sa.Nlen = pp.Nlen
sa.Alen = pp.Alen sa.Alen = pp.Alen
sa.Slen = pp.Slen sa.Slen = pp.Slen
for i := 0; i < len(sa.Data); i++ { sa.Data = pp.Data
sa.Data[i] = pp.Data[i]
}
return sa, nil return sa, nil
case AF_UNIX: case AF_UNIX:
@ -262,9 +254,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
sa := new(SockaddrInet4) sa := new(SockaddrInet4)
p := (*[2]byte)(unsafe.Pointer(&pp.Port)) p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1]) sa.Port = int(p[0])<<8 + int(p[1])
for i := 0; i < len(sa.Addr); i++ { sa.Addr = pp.Addr
sa.Addr[i] = pp.Addr[i]
}
return sa, nil return sa, nil
case AF_INET6: case AF_INET6:
@ -273,9 +263,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
p := (*[2]byte)(unsafe.Pointer(&pp.Port)) p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1]) sa.Port = int(p[0])<<8 + int(p[1])
sa.ZoneId = pp.Scope_id sa.ZoneId = pp.Scope_id
for i := 0; i < len(sa.Addr); i++ { sa.Addr = pp.Addr
sa.Addr[i] = pp.Addr[i]
}
return sa, nil return sa, nil
} }
return anyToSockaddrGOOS(fd, rsa) return anyToSockaddrGOOS(fd, rsa)
@ -337,10 +325,9 @@ func GetsockoptString(fd, level, opt int) (string, error) {
//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) //sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) //sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) { func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
var msg Msghdr var msg Msghdr
var rsa RawSockaddrAny msg.Name = (*byte)(unsafe.Pointer(rsa))
msg.Name = (*byte)(unsafe.Pointer(&rsa))
msg.Namelen = uint32(SizeofSockaddrAny) msg.Namelen = uint32(SizeofSockaddrAny)
var iov Iovec var iov Iovec
if len(p) > 0 { if len(p) > 0 {
@ -364,29 +351,12 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from
} }
oobn = int(msg.Controllen) oobn = int(msg.Controllen)
recvflags = int(msg.Flags) recvflags = int(msg.Flags)
// source address is only specified if the socket is unconnected
if rsa.Addr.Family != AF_UNSPEC {
from, err = anyToSockaddr(fd, &rsa)
}
return return
} }
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) { func sendmsgN(fd int, p, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
_, err = SendmsgN(fd, p, oob, to, flags)
return
}
func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
var ptr unsafe.Pointer
var salen _Socklen
if to != nil {
ptr, salen, err = to.sockaddr()
if err != nil {
return 0, err
}
}
var msg Msghdr var msg Msghdr
msg.Name = (*byte)(unsafe.Pointer(ptr)) msg.Name = (*byte)(unsafe.Pointer(ptr))
msg.Namelen = uint32(salen) msg.Namelen = uint32(salen)
@ -583,12 +553,7 @@ func UtimesNano(path string, ts []Timespec) error {
if len(ts) != 2 { if len(ts) != 2 {
return EINVAL return EINVAL
} }
// Darwin setattrlist can set nanosecond timestamps err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
err := setattrlistTimes(path, ts, 0)
if err != ENOSYS {
return err
}
err = utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
if err != ENOSYS { if err != ENOSYS {
return err return err
} }
@ -608,10 +573,6 @@ func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
if len(ts) != 2 { if len(ts) != 2 {
return EINVAL return EINVAL
} }
err := setattrlistTimes(path, ts, flags)
if err != ENOSYS {
return err
}
return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags) return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags)
} }

View File

@ -48,6 +48,30 @@ func (sa *SockaddrCtl) sockaddr() (unsafe.Pointer, _Socklen, error) {
return unsafe.Pointer(&sa.raw), SizeofSockaddrCtl, nil return unsafe.Pointer(&sa.raw), SizeofSockaddrCtl, nil
} }
// SockaddrVM implements the Sockaddr interface for AF_VSOCK type sockets.
// SockaddrVM provides access to Darwin VM sockets: a mechanism that enables
// bidirectional communication between a hypervisor and its guest virtual
// machines.
type SockaddrVM struct {
// CID and Port specify a context ID and port address for a VM socket.
// Guests have a unique CID, and hosts may have a well-known CID of:
// - VMADDR_CID_HYPERVISOR: refers to the hypervisor process.
// - VMADDR_CID_LOCAL: refers to local communication (loopback).
// - VMADDR_CID_HOST: refers to other processes on the host.
CID uint32
Port uint32
raw RawSockaddrVM
}
func (sa *SockaddrVM) sockaddr() (unsafe.Pointer, _Socklen, error) {
sa.raw.Len = SizeofSockaddrVM
sa.raw.Family = AF_VSOCK
sa.raw.Port = sa.Port
sa.raw.Cid = sa.CID
return unsafe.Pointer(&sa.raw), SizeofSockaddrVM, nil
}
func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) { func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
switch rsa.Addr.Family { switch rsa.Addr.Family {
case AF_SYSTEM: case AF_SYSTEM:
@ -58,6 +82,13 @@ func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
sa.Unit = pp.Sc_unit sa.Unit = pp.Sc_unit
return sa, nil return sa, nil
} }
case AF_VSOCK:
pp := (*RawSockaddrVM)(unsafe.Pointer(rsa))
sa := &SockaddrVM{
CID: pp.Cid,
Port: pp.Port,
}
return sa, nil
} }
return nil, EAFNOSUPPORT return nil, EAFNOSUPPORT
} }
@ -110,16 +141,6 @@ func direntNamlen(buf []byte) (uint64, bool) {
func PtraceAttach(pid int) (err error) { return ptrace(PT_ATTACH, pid, 0, 0) } func PtraceAttach(pid int) (err error) { return ptrace(PT_ATTACH, pid, 0, 0) }
func PtraceDetach(pid int) (err error) { return ptrace(PT_DETACH, pid, 0, 0) } func PtraceDetach(pid int) (err error) { return ptrace(PT_DETACH, pid, 0, 0) }
type attrList struct {
bitmapCount uint16
_ uint16
CommonAttr uint32
VolAttr uint32
DirAttr uint32
FileAttr uint32
Forkattr uint32
}
//sysnb pipe(p *[2]int32) (err error) //sysnb pipe(p *[2]int32) (err error)
func Pipe(p []int) (err error) { func Pipe(p []int) (err error) {
@ -128,8 +149,10 @@ func Pipe(p []int) (err error) {
} }
var x [2]int32 var x [2]int32
err = pipe(&x) err = pipe(&x)
p[0] = int(x[0]) if err == nil {
p[1] = int(x[1]) p[0] = int(x[0])
p[1] = int(x[1])
}
return return
} }
@ -249,36 +272,7 @@ func Flistxattr(fd int, dest []byte) (sz int, err error) {
return flistxattr(fd, xattrPointer(dest), len(dest), 0) return flistxattr(fd, xattrPointer(dest), len(dest), 0)
} }
func setattrlistTimes(path string, times []Timespec, flags int) error { //sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)
_p0, err := BytePtrFromString(path)
if err != nil {
return err
}
var attrList attrList
attrList.bitmapCount = ATTR_BIT_MAP_COUNT
attrList.CommonAttr = ATTR_CMN_MODTIME | ATTR_CMN_ACCTIME
// order is mtime, atime: the opposite of Chtimes
attributes := [2]Timespec{times[1], times[0]}
options := 0
if flags&AT_SYMLINK_NOFOLLOW != 0 {
options |= FSOPT_NOFOLLOW
}
return setattrlist(
_p0,
unsafe.Pointer(&attrList),
unsafe.Pointer(&attributes),
unsafe.Sizeof(attributes),
options)
}
//sys setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error)
func utimensat(dirfd int, path string, times *[2]Timespec, flags int) error {
// Darwin doesn't support SYS_UTIMENSAT
return ENOSYS
}
/* /*
* Wrapped * Wrapped
@ -399,8 +393,25 @@ func GetsockoptXucred(fd, level, opt int) (*Xucred, error) {
return x, err return x, err
} }
func SysctlKinfoProcSlice(name string) ([]KinfoProc, error) { func SysctlKinfoProc(name string, args ...int) (*KinfoProc, error) {
mib, err := sysctlmib(name) mib, err := sysctlmib(name, args...)
if err != nil {
return nil, err
}
var kinfo KinfoProc
n := uintptr(SizeofKinfoProc)
if err := sysctl(mib, (*byte)(unsafe.Pointer(&kinfo)), &n, nil, 0); err != nil {
return nil, err
}
if n != SizeofKinfoProc {
return nil, EIO
}
return &kinfo, nil
}
func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
mib, err := sysctlmib(name, args...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -433,6 +444,11 @@ func SysctlKinfoProcSlice(name string) ([]KinfoProc, error) {
//sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) //sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error)
//sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error)
//sys shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error)
//sys shmdt(addr uintptr) (err error)
//sys shmget(key int, size int, flag int) (id int, err error)
/* /*
* Exposed directly * Exposed directly
*/ */
@ -491,8 +507,8 @@ func SysctlKinfoProcSlice(name string) ([]KinfoProc, error) {
//sys Open(path string, mode int, perm uint32) (fd int, err error) //sys Open(path string, mode int, perm uint32) (fd int, err error)
//sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) //sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error)
//sys Pathconf(path string, name int) (val int, err error) //sys Pathconf(path string, name int) (val int, err error)
//sys Pread(fd int, p []byte, offset int64) (n int, err error) //sys pread(fd int, p []byte, offset int64) (n int, err error)
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) //sys pwrite(fd int, p []byte, offset int64) (n int, err error)
//sys read(fd int, p []byte) (n int, err error) //sys read(fd int, p []byte) (n int, err error)
//sys Readlink(path string, buf []byte) (n int, err error) //sys Readlink(path string, buf []byte) (n int, err error)
//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error) //sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
@ -590,10 +606,6 @@ func SysctlKinfoProcSlice(name string) ([]KinfoProc, error) {
// Msgget // Msgget
// Msgsnd // Msgsnd
// Msgrcv // Msgrcv
// Shmat
// Shmctl
// Shmdt
// Shmget
// Shm_open // Shm_open
// Shm_unlink // Shm_unlink
// Sem_open // Sem_open

View File

@ -101,7 +101,10 @@ func Pipe(p []int) (err error) {
if len(p) != 2 { if len(p) != 2 {
return EINVAL return EINVAL
} }
p[0], p[1], err = pipe() r, w, err := pipe()
if err == nil {
p[0], p[1] = r, w
}
return return
} }
@ -114,17 +117,20 @@ func Pipe2(p []int, flags int) (err error) {
var pp [2]_C_int var pp [2]_C_int
// pipe2 on dragonfly takes an fds array as an argument, but still // pipe2 on dragonfly takes an fds array as an argument, but still
// returns the file descriptors. // returns the file descriptors.
p[0], p[1], err = pipe2(&pp, flags) r, w, err := pipe2(&pp, flags)
if err == nil {
p[0], p[1] = r, w
}
return err return err
} }
//sys extpread(fd int, p []byte, flags int, offset int64) (n int, err error) //sys extpread(fd int, p []byte, flags int, offset int64) (n int, err error)
func Pread(fd int, p []byte, offset int64) (n int, err error) { func pread(fd int, p []byte, offset int64) (n int, err error) {
return extpread(fd, p, 0, offset) return extpread(fd, p, 0, offset)
} }
//sys extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error) //sys extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error)
func Pwrite(fd int, p []byte, offset int64) (n int, err error) { func pwrite(fd int, p []byte, offset int64) (n int, err error) {
return extpwrite(fd, p, 0, offset) return extpwrite(fd, p, 0, offset)
} }
@ -163,11 +169,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
return return
} }
func setattrlistTimes(path string, times []Timespec, flags int) error {
// used on Darwin for UtimesNano
return ENOSYS
}
//sys ioctl(fd int, req uint, arg uintptr) (err error) //sys ioctl(fd int, req uint, arg uintptr) (err error)
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL //sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL

View File

@ -110,8 +110,10 @@ func Pipe2(p []int, flags int) error {
} }
var pp [2]_C_int var pp [2]_C_int
err := pipe2(&pp, flags) err := pipe2(&pp, flags)
p[0] = int(pp[0]) if err == nil {
p[1] = int(pp[1]) p[0] = int(pp[0])
p[1] = int(pp[1])
}
return err return err
} }
@ -192,11 +194,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
return return
} }
func setattrlistTimes(path string, times []Timespec, flags int) error {
// used on Darwin for UtimesNano
return ENOSYS
}
//sys ioctl(fd int, req uint, arg uintptr) (err error) //sys ioctl(fd int, req uint, arg uintptr) (err error)
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL //sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
@ -636,8 +633,8 @@ func PtraceSingleStep(pid int) (err error) {
//sys Open(path string, mode int, perm uint32) (fd int, err error) //sys Open(path string, mode int, perm uint32) (fd int, err error)
//sys Openat(fdat int, path string, mode int, perm uint32) (fd int, err error) //sys Openat(fdat int, path string, mode int, perm uint32) (fd int, err error)
//sys Pathconf(path string, name int) (val int, err error) //sys Pathconf(path string, name int) (val int, err error)
//sys Pread(fd int, p []byte, offset int64) (n int, err error) //sys pread(fd int, p []byte, offset int64) (n int, err error)
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) //sys pwrite(fd int, p []byte, offset int64) (n int, err error)
//sys read(fd int, p []byte) (n int, err error) //sys read(fd int, p []byte) (n int, err error)
//sys Readlink(path string, buf []byte) (n int, err error) //sys Readlink(path string, buf []byte) (n int, err error)
//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error) //sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)

View File

@ -162,6 +162,14 @@ func (l *Lifreq) GetLifruInt() int {
return *(*int)(unsafe.Pointer(&l.Lifru[0])) return *(*int)(unsafe.Pointer(&l.Lifru[0]))
} }
func (l *Lifreq) SetLifruUint(d uint) {
*(*uint)(unsafe.Pointer(&l.Lifru[0])) = d
}
func (l *Lifreq) GetLifruUint() uint {
return *(*uint)(unsafe.Pointer(&l.Lifru[0]))
}
func IoctlLifreq(fd int, req uint, l *Lifreq) error { func IoctlLifreq(fd int, req uint, l *Lifreq) error {
return ioctl(fd, req, uintptr(unsafe.Pointer(l))) return ioctl(fd, req, uintptr(unsafe.Pointer(l)))
} }

View File

@ -13,8 +13,8 @@ package unix
import ( import (
"encoding/binary" "encoding/binary"
"runtime"
"syscall" "syscall"
"time"
"unsafe" "unsafe"
) )
@ -38,6 +38,13 @@ func Creat(path string, mode uint32) (fd int, err error) {
return Open(path, O_CREAT|O_WRONLY|O_TRUNC, mode) return Open(path, O_CREAT|O_WRONLY|O_TRUNC, mode)
} }
func EpollCreate(size int) (fd int, err error) {
if size <= 0 {
return -1, EINVAL
}
return EpollCreate1(0)
}
//sys FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) //sys FanotifyInit(flags uint, event_f_flags uint) (fd int, err error)
//sys fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) //sys fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error)
@ -66,6 +73,10 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
return fchmodat(dirfd, path, mode) return fchmodat(dirfd, path, mode)
} }
func InotifyInit() (fd int, err error) {
return InotifyInit1(0)
}
//sys ioctl(fd int, req uint, arg uintptr) (err error) = SYS_IOCTL //sys ioctl(fd int, req uint, arg uintptr) (err error) = SYS_IOCTL
//sys ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL //sys ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL
@ -109,6 +120,25 @@ func Openat2(dirfd int, path string, how *OpenHow) (fd int, err error) {
return openat2(dirfd, path, how, SizeofOpenHow) return openat2(dirfd, path, how, SizeofOpenHow)
} }
func Pipe(p []int) error {
return Pipe2(p, 0)
}
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
func Pipe2(p []int, flags int) error {
if len(p) != 2 {
return EINVAL
}
var pp [2]_C_int
err := pipe2(&pp, flags)
if err == nil {
p[0] = int(pp[0])
p[1] = int(pp[1])
}
return err
}
//sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) //sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
@ -118,6 +148,15 @@ func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error
return ppoll(&fds[0], len(fds), timeout, sigmask) return ppoll(&fds[0], len(fds), timeout, sigmask)
} }
func Poll(fds []PollFd, timeout int) (n int, err error) {
var ts *Timespec
if timeout >= 0 {
ts = new(Timespec)
*ts = NsecToTimespec(int64(timeout) * 1e6)
}
return Ppoll(fds, ts, nil)
}
//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error) //sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
func Readlink(path string, buf []byte) (n int, err error) { func Readlink(path string, buf []byte) (n int, err error) {
@ -168,27 +207,7 @@ func Utimes(path string, tv []Timeval) error {
//sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) //sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)
func UtimesNano(path string, ts []Timespec) error { func UtimesNano(path string, ts []Timespec) error {
if ts == nil { return UtimesNanoAt(AT_FDCWD, path, ts, 0)
err := utimensat(AT_FDCWD, path, nil, 0)
if err != ENOSYS {
return err
}
return utimes(path, nil)
}
if len(ts) != 2 {
return EINVAL
}
err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
if err != ENOSYS {
return err
}
// If the utimensat syscall isn't available (utimensat was added to Linux
// in 2.6.22, Released, 8 July 2007) then fall back to utimes
var tv [2]Timeval
for i := 0; i < 2; i++ {
tv[i] = NsecToTimeval(TimespecToNsec(ts[i]))
}
return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
} }
func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error { func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
@ -231,6 +250,13 @@ func Getwd() (wd string, err error) {
if n < 1 || n > len(buf) || buf[n-1] != 0 { if n < 1 || n > len(buf) || buf[n-1] != 0 {
return "", EINVAL return "", EINVAL
} }
// In some cases, Linux can return a path that starts with the
// "(unreachable)" prefix, which can potentially be a valid relative
// path. To work around that, return ENOENT if path is not absolute.
if buf[0] != '/' {
return "", ENOENT
}
return string(buf[0 : n-1]), nil return string(buf[0 : n-1]), nil
} }
@ -340,6 +366,8 @@ func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int,
return return
} }
//sys Waitid(idType int, id int, info *Siginfo, options int, rusage *Rusage) (err error)
func Mkfifo(path string, mode uint32) error { func Mkfifo(path string, mode uint32) error {
return Mknod(path, mode|S_IFIFO, 0) return Mknod(path, mode|S_IFIFO, 0)
} }
@ -356,9 +384,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port)) p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
p[0] = byte(sa.Port >> 8) p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port) p[1] = byte(sa.Port)
for i := 0; i < len(sa.Addr); i++ { sa.raw.Addr = sa.Addr
sa.raw.Addr[i] = sa.Addr[i]
}
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
} }
@ -371,9 +397,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
p[0] = byte(sa.Port >> 8) p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port) p[1] = byte(sa.Port)
sa.raw.Scope_id = sa.ZoneId sa.raw.Scope_id = sa.ZoneId
for i := 0; i < len(sa.Addr); i++ { sa.raw.Addr = sa.Addr
sa.raw.Addr[i] = sa.Addr[i]
}
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
} }
@ -422,9 +446,7 @@ func (sa *SockaddrLinklayer) sockaddr() (unsafe.Pointer, _Socklen, error) {
sa.raw.Hatype = sa.Hatype sa.raw.Hatype = sa.Hatype
sa.raw.Pkttype = sa.Pkttype sa.raw.Pkttype = sa.Pkttype
sa.raw.Halen = sa.Halen sa.raw.Halen = sa.Halen
for i := 0; i < len(sa.Addr); i++ { sa.raw.Addr = sa.Addr
sa.raw.Addr[i] = sa.Addr[i]
}
return unsafe.Pointer(&sa.raw), SizeofSockaddrLinklayer, nil return unsafe.Pointer(&sa.raw), SizeofSockaddrLinklayer, nil
} }
@ -839,12 +861,10 @@ func (sa *SockaddrTIPC) sockaddr() (unsafe.Pointer, _Socklen, error) {
if sa.Addr == nil { if sa.Addr == nil {
return nil, 0, EINVAL return nil, 0, EINVAL
} }
sa.raw.Family = AF_TIPC sa.raw.Family = AF_TIPC
sa.raw.Scope = int8(sa.Scope) sa.raw.Scope = int8(sa.Scope)
sa.raw.Addrtype = sa.Addr.tipcAddrtype() sa.raw.Addrtype = sa.Addr.tipcAddrtype()
sa.raw.Addr = sa.Addr.tipcAddr() sa.raw.Addr = sa.Addr.tipcAddr()
return unsafe.Pointer(&sa.raw), SizeofSockaddrTIPC, nil return unsafe.Pointer(&sa.raw), SizeofSockaddrTIPC, nil
} }
@ -858,9 +878,7 @@ type SockaddrL2TPIP struct {
func (sa *SockaddrL2TPIP) sockaddr() (unsafe.Pointer, _Socklen, error) { func (sa *SockaddrL2TPIP) sockaddr() (unsafe.Pointer, _Socklen, error) {
sa.raw.Family = AF_INET sa.raw.Family = AF_INET
sa.raw.Conn_id = sa.ConnId sa.raw.Conn_id = sa.ConnId
for i := 0; i < len(sa.Addr); i++ { sa.raw.Addr = sa.Addr
sa.raw.Addr[i] = sa.Addr[i]
}
return unsafe.Pointer(&sa.raw), SizeofSockaddrL2TPIP, nil return unsafe.Pointer(&sa.raw), SizeofSockaddrL2TPIP, nil
} }
@ -876,9 +894,7 @@ func (sa *SockaddrL2TPIP6) sockaddr() (unsafe.Pointer, _Socklen, error) {
sa.raw.Family = AF_INET6 sa.raw.Family = AF_INET6
sa.raw.Conn_id = sa.ConnId sa.raw.Conn_id = sa.ConnId
sa.raw.Scope_id = sa.ZoneId sa.raw.Scope_id = sa.ZoneId
for i := 0; i < len(sa.Addr); i++ { sa.raw.Addr = sa.Addr
sa.raw.Addr[i] = sa.Addr[i]
}
return unsafe.Pointer(&sa.raw), SizeofSockaddrL2TPIP6, nil return unsafe.Pointer(&sa.raw), SizeofSockaddrL2TPIP6, nil
} }
@ -974,9 +990,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
sa.Hatype = pp.Hatype sa.Hatype = pp.Hatype
sa.Pkttype = pp.Pkttype sa.Pkttype = pp.Pkttype
sa.Halen = pp.Halen sa.Halen = pp.Halen
for i := 0; i < len(sa.Addr); i++ { sa.Addr = pp.Addr
sa.Addr[i] = pp.Addr[i]
}
return sa, nil return sa, nil
case AF_UNIX: case AF_UNIX:
@ -1015,18 +1029,14 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
pp := (*RawSockaddrL2TPIP)(unsafe.Pointer(rsa)) pp := (*RawSockaddrL2TPIP)(unsafe.Pointer(rsa))
sa := new(SockaddrL2TPIP) sa := new(SockaddrL2TPIP)
sa.ConnId = pp.Conn_id sa.ConnId = pp.Conn_id
for i := 0; i < len(sa.Addr); i++ { sa.Addr = pp.Addr
sa.Addr[i] = pp.Addr[i]
}
return sa, nil return sa, nil
default: default:
pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa)) pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
sa := new(SockaddrInet4) sa := new(SockaddrInet4)
p := (*[2]byte)(unsafe.Pointer(&pp.Port)) p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1]) sa.Port = int(p[0])<<8 + int(p[1])
for i := 0; i < len(sa.Addr); i++ { sa.Addr = pp.Addr
sa.Addr[i] = pp.Addr[i]
}
return sa, nil return sa, nil
} }
@ -1042,9 +1052,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
sa := new(SockaddrL2TPIP6) sa := new(SockaddrL2TPIP6)
sa.ConnId = pp.Conn_id sa.ConnId = pp.Conn_id
sa.ZoneId = pp.Scope_id sa.ZoneId = pp.Scope_id
for i := 0; i < len(sa.Addr); i++ { sa.Addr = pp.Addr
sa.Addr[i] = pp.Addr[i]
}
return sa, nil return sa, nil
default: default:
pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa)) pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
@ -1052,9 +1060,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
p := (*[2]byte)(unsafe.Pointer(&pp.Port)) p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1]) sa.Port = int(p[0])<<8 + int(p[1])
sa.ZoneId = pp.Scope_id sa.ZoneId = pp.Scope_id
for i := 0; i < len(sa.Addr); i++ { sa.Addr = pp.Addr
sa.Addr[i] = pp.Addr[i]
}
return sa, nil return sa, nil
} }
@ -1229,11 +1235,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
func Accept(fd int) (nfd int, sa Sockaddr, err error) { func Accept(fd int) (nfd int, sa Sockaddr, err error) {
var rsa RawSockaddrAny var rsa RawSockaddrAny
var len _Socklen = SizeofSockaddrAny var len _Socklen = SizeofSockaddrAny
// Try accept4 first for Android, then try accept for kernel older than 2.6.28
nfd, err = accept4(fd, &rsa, &len, 0) nfd, err = accept4(fd, &rsa, &len, 0)
if err == ENOSYS {
nfd, err = accept(fd, &rsa, &len)
}
if err != nil { if err != nil {
return return
} }
@ -1497,10 +1499,9 @@ func KeyctlRestrictKeyring(ringid int, keyType string, restriction string) error
//sys keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) = SYS_KEYCTL //sys keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) = SYS_KEYCTL
//sys keyctlRestrictKeyring(cmd int, arg2 int) (err error) = SYS_KEYCTL //sys keyctlRestrictKeyring(cmd int, arg2 int) (err error) = SYS_KEYCTL
func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) { func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
var msg Msghdr var msg Msghdr
var rsa RawSockaddrAny msg.Name = (*byte)(unsafe.Pointer(rsa))
msg.Name = (*byte)(unsafe.Pointer(&rsa))
msg.Namelen = uint32(SizeofSockaddrAny) msg.Namelen = uint32(SizeofSockaddrAny)
var iov Iovec var iov Iovec
if len(p) > 0 { if len(p) > 0 {
@ -1531,28 +1532,10 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from
} }
oobn = int(msg.Controllen) oobn = int(msg.Controllen)
recvflags = int(msg.Flags) recvflags = int(msg.Flags)
// source address is only specified if the socket is unconnected
if rsa.Addr.Family != AF_UNSPEC {
from, err = anyToSockaddr(fd, &rsa)
}
return return
} }
func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) { func sendmsgN(fd int, p, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
_, err = SendmsgN(fd, p, oob, to, flags)
return
}
func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
var ptr unsafe.Pointer
var salen _Socklen
if to != nil {
var err error
ptr, salen, err = to.sockaddr()
if err != nil {
return 0, err
}
}
var msg Msghdr var msg Msghdr
msg.Name = (*byte)(ptr) msg.Name = (*byte)(ptr)
msg.Namelen = uint32(salen) msg.Namelen = uint32(salen)
@ -1785,6 +1768,16 @@ func Mount(source string, target string, fstype string, flags uintptr, data stri
return mount(source, target, fstype, flags, datap) return mount(source, target, fstype, flags, datap)
} }
//sys mountSetattr(dirfd int, pathname string, flags uint, attr *MountAttr, size uintptr) (err error) = SYS_MOUNT_SETATTR
// MountSetattr is a wrapper for mount_setattr(2).
// https://man7.org/linux/man-pages/man2/mount_setattr.2.html
//
// Requires kernel >= 5.12.
func MountSetattr(dirfd int, pathname string, flags uint, attr *MountAttr) error {
return mountSetattr(dirfd, pathname, flags, attr, unsafe.Sizeof(*attr))
}
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
if raceenabled { if raceenabled {
raceReleaseMerge(unsafe.Pointer(&ioSync)) raceReleaseMerge(unsafe.Pointer(&ioSync))
@ -1816,11 +1809,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Dup(oldfd int) (fd int, err error) //sys Dup(oldfd int) (fd int, err error)
func Dup2(oldfd, newfd int) error { func Dup2(oldfd, newfd int) error {
// Android O and newer blocks dup2; riscv and arm64 don't implement dup2. return Dup3(oldfd, newfd, 0)
if runtime.GOOS == "android" || runtime.GOARCH == "riscv64" || runtime.GOARCH == "arm64" {
return Dup3(oldfd, newfd, 0)
}
return dup2(oldfd, newfd)
} }
//sys Dup3(oldfd int, newfd int, flags int) (err error) //sys Dup3(oldfd int, newfd int, flags int) (err error)
@ -1840,6 +1829,9 @@ func Dup2(oldfd, newfd int) error {
//sys Fremovexattr(fd int, attr string) (err error) //sys Fremovexattr(fd int, attr string) (err error)
//sys Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) //sys Fsetxattr(fd int, attr string, dest []byte, flags int) (err error)
//sys Fsync(fd int) (err error) //sys Fsync(fd int) (err error)
//sys Fsmount(fd int, flags int, mountAttrs int) (fsfd int, err error)
//sys Fsopen(fsName string, flags int) (fd int, err error)
//sys Fspick(dirfd int, pathName string, flags int) (fd int, err error)
//sys Getdents(fd int, buf []byte) (n int, err error) = SYS_GETDENTS64 //sys Getdents(fd int, buf []byte) (n int, err error) = SYS_GETDENTS64
//sysnb Getpgid(pid int) (pgid int, err error) //sysnb Getpgid(pid int) (pgid int, err error)
@ -1870,7 +1862,9 @@ func Getpgrp() (pid int) {
//sys MemfdCreate(name string, flags int) (fd int, err error) //sys MemfdCreate(name string, flags int) (fd int, err error)
//sys Mkdirat(dirfd int, path string, mode uint32) (err error) //sys Mkdirat(dirfd int, path string, mode uint32) (err error)
//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error) //sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
//sys MoveMount(fromDirfd int, fromPathName string, toDirfd int, toPathName string, flags int) (err error)
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error) //sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
//sys OpenTree(dfd int, fileName string, flags uint) (r int, err error)
//sys PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) //sys PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error)
//sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT //sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
//sysnb Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64 //sysnb Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64
@ -2195,7 +2189,7 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
gid = Getgid() gid = Getgid()
} }
if uint32(gid) == st.Gid || isGroupMember(gid) { if uint32(gid) == st.Gid || isGroupMember(int(st.Gid)) {
fmode = (st.Mode >> 3) & 7 fmode = (st.Mode >> 3) & 7
} else { } else {
fmode = st.Mode & 7 fmode = st.Mode & 7
@ -2308,11 +2302,65 @@ type RemoteIovec struct {
//sys ProcessVMReadv(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) = SYS_PROCESS_VM_READV //sys ProcessVMReadv(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) = SYS_PROCESS_VM_READV
//sys ProcessVMWritev(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) = SYS_PROCESS_VM_WRITEV //sys ProcessVMWritev(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) = SYS_PROCESS_VM_WRITEV
//sys PidfdOpen(pid int, flags int) (fd int, err error) = SYS_PIDFD_OPEN
//sys PidfdGetfd(pidfd int, targetfd int, flags int) (fd int, err error) = SYS_PIDFD_GETFD
//sys PidfdSendSignal(pidfd int, sig Signal, info *Siginfo, flags int) (err error) = SYS_PIDFD_SEND_SIGNAL
//sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error)
//sys shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error)
//sys shmdt(addr uintptr) (err error)
//sys shmget(key int, size int, flag int) (id int, err error)
//sys getitimer(which int, currValue *Itimerval) (err error)
//sys setitimer(which int, newValue *Itimerval, oldValue *Itimerval) (err error)
// MakeItimerval creates an Itimerval from interval and value durations.
func MakeItimerval(interval, value time.Duration) Itimerval {
return Itimerval{
Interval: NsecToTimeval(interval.Nanoseconds()),
Value: NsecToTimeval(value.Nanoseconds()),
}
}
// A value which may be passed to the which parameter for Getitimer and
// Setitimer.
type ItimerWhich int
// Possible which values for Getitimer and Setitimer.
const (
ItimerReal ItimerWhich = ITIMER_REAL
ItimerVirtual ItimerWhich = ITIMER_VIRTUAL
ItimerProf ItimerWhich = ITIMER_PROF
)
// Getitimer wraps getitimer(2) to return the current value of the timer
// specified by which.
func Getitimer(which ItimerWhich) (Itimerval, error) {
var it Itimerval
if err := getitimer(int(which), &it); err != nil {
return Itimerval{}, err
}
return it, nil
}
// Setitimer wraps setitimer(2) to arm or disarm the timer specified by which.
// It returns the previous value of the timer.
//
// If the Itimerval argument is the zero value, the timer will be disarmed.
func Setitimer(which ItimerWhich, it Itimerval) (Itimerval, error) {
var prev Itimerval
if err := setitimer(int(which), &it, &prev); err != nil {
return Itimerval{}, err
}
return prev, nil
}
/* /*
* Unimplemented * Unimplemented
*/ */
// AfsSyscall // AfsSyscall
// Alarm
// ArchPrctl // ArchPrctl
// Brk // Brk
// ClockNanosleep // ClockNanosleep
@ -2328,7 +2376,6 @@ type RemoteIovec struct {
// GetMempolicy // GetMempolicy
// GetRobustList // GetRobustList
// GetThreadArea // GetThreadArea
// Getitimer
// Getpmsg // Getpmsg
// IoCancel // IoCancel
// IoDestroy // IoDestroy
@ -2389,10 +2436,6 @@ type RemoteIovec struct {
// SetRobustList // SetRobustList
// SetThreadArea // SetThreadArea
// SetTidAddress // SetTidAddress
// Shmat
// Shmctl
// Shmdt
// Shmget
// Sigaltstack // Sigaltstack
// Swapoff // Swapoff
// Swapon // Swapon
@ -2410,5 +2453,4 @@ type RemoteIovec struct {
// Vfork // Vfork
// Vhangup // Vhangup
// Vserver // Vserver
// Waitid
// _Sysctl // _Sysctl

View File

@ -19,36 +19,8 @@ func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: int32(sec), Usec: int32(usec)} return Timeval{Sec: int32(sec), Usec: int32(usec)}
} }
//sysnb pipe(p *[2]_C_int) (err error)
func Pipe(p []int) (err error) {
if len(p) != 2 {
return EINVAL
}
var pp [2]_C_int
err = pipe(&pp)
p[0] = int(pp[0])
p[1] = int(pp[1])
return
}
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
func Pipe2(p []int, flags int) (err error) {
if len(p) != 2 {
return EINVAL
}
var pp [2]_C_int
err = pipe2(&pp, flags)
p[0] = int(pp[0])
p[1] = int(pp[1])
return
}
// 64-bit file system and 32-bit uid calls // 64-bit file system and 32-bit uid calls
// (386 default is 32-bit file system and 16-bit uid). // (386 default is 32-bit file system and 16-bit uid).
//sys dup2(oldfd int, newfd int) (err error)
//sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64
//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32 //sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
@ -59,13 +31,12 @@ func Pipe2(p []int, flags int) (err error) {
//sysnb Geteuid() (euid int) = SYS_GETEUID32 //sysnb Geteuid() (euid int) = SYS_GETEUID32
//sysnb Getgid() (gid int) = SYS_GETGID32 //sysnb Getgid() (gid int) = SYS_GETGID32
//sysnb Getuid() (uid int) = SYS_GETUID32 //sysnb Getuid() (uid int) = SYS_GETUID32
//sysnb InotifyInit() (fd int, err error)
//sys Ioperm(from int, num int, on int) (err error) //sys Ioperm(from int, num int, on int) (err error)
//sys Iopl(level int) (err error) //sys Iopl(level int) (err error)
//sys Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32 //sys Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64 //sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 //sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 //sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64 //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
//sys setfsgid(gid int) (prev int, err error) = SYS_SETFSGID32 //sys setfsgid(gid int) (prev int, err error) = SYS_SETFSGID32
@ -202,14 +173,6 @@ const (
_SENDMMSG = 20 _SENDMMSG = 20
) )
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
fd, e := socketcall(_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
if e != 0 {
err = e
}
return
}
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
fd, e := socketcall(_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) fd, e := socketcall(_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
if e != 0 { if e != 0 {
@ -381,12 +344,3 @@ func (cmsg *Cmsghdr) SetLen(length int) {
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) { func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
rsa.Service_name_len = uint32(length) rsa.Service_name_len = uint32(length)
} }
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
func Poll(fds []PollFd, timeout int) (n int, err error) {
if len(fds) == 0 {
return poll(nil, 0, timeout)
}
return poll(&fds[0], len(fds), timeout)
}

14
vendor/golang.org/x/sys/unix/syscall_linux_alarm.go generated vendored Normal file
View File

@ -0,0 +1,14 @@
// Copyright 2022 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build linux && (386 || amd64 || mips || mipsle || mips64 || mipsle || ppc64 || ppc64le || ppc || s390x || sparc64)
// +build linux
// +build 386 amd64 mips mipsle mips64 mipsle ppc64 ppc64le ppc s390x sparc64
package unix
// SYS_ALARM is not defined on arm or riscv, but is available for other GOARCH
// values.
//sys Alarm(seconds uint) (remaining uint, err error)

View File

@ -7,8 +7,6 @@
package unix package unix
//sys dup2(oldfd int, newfd int) (err error)
//sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
//sys Fchown(fd int, uid int, gid int) (err error) //sys Fchown(fd int, uid int, gid int) (err error)
@ -21,17 +19,6 @@ package unix
//sysnb Getgid() (gid int) //sysnb Getgid() (gid int)
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) //sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
//sysnb Getuid() (uid int) //sysnb Getuid() (uid int)
//sysnb inotifyInit() (fd int, err error)
func InotifyInit() (fd int, err error) {
// First try inotify_init1, because Android's seccomp policy blocks the latter.
fd, err = InotifyInit1(0)
if err == ENOSYS {
fd, err = inotifyInit()
}
return
}
//sys Ioperm(from int, num int, on int) (err error) //sys Ioperm(from int, num int, on int) (err error)
//sys Iopl(level int) (err error) //sys Iopl(level int) (err error)
//sys Lchown(path string, uid int, gid int) (err error) //sys Lchown(path string, uid int, gid int) (err error)
@ -41,9 +28,10 @@ func Lstat(path string, stat *Stat_t) (err error) {
return Fstatat(AT_FDCWD, path, stat, AT_SYMLINK_NOFOLLOW) return Fstatat(AT_FDCWD, path, stat, AT_SYMLINK_NOFOLLOW)
} }
//sys MemfdSecret(flags int) (fd int, err error)
//sys Pause() (err error) //sys Pause() (err error)
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 //sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 //sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK //sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
@ -75,7 +63,6 @@ func Stat(path string, stat *Stat_t) (err error) {
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error) //sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
//sys Truncate(path string, length int64) (err error) //sys Truncate(path string, length int64) (err error)
//sys Ustat(dev int, ubuf *Ustat_t) (err error) //sys Ustat(dev int, ubuf *Ustat_t) (err error)
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) //sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) //sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) //sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@ -126,32 +113,6 @@ func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: sec, Usec: usec} return Timeval{Sec: sec, Usec: usec}
} }
//sysnb pipe(p *[2]_C_int) (err error)
func Pipe(p []int) (err error) {
if len(p) != 2 {
return EINVAL
}
var pp [2]_C_int
err = pipe(&pp)
p[0] = int(pp[0])
p[1] = int(pp[1])
return
}
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
func Pipe2(p []int, flags int) (err error) {
if len(p) != 2 {
return EINVAL
}
var pp [2]_C_int
err = pipe2(&pp, flags)
p[0] = int(pp[0])
p[1] = int(pp[1])
return
}
func (r *PtraceRegs) PC() uint64 { return r.Rip } func (r *PtraceRegs) PC() uint64 { return r.Rip }
func (r *PtraceRegs) SetPC(pc uint64) { r.Rip = pc } func (r *PtraceRegs) SetPC(pc uint64) { r.Rip = pc }
@ -176,15 +137,6 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
rsa.Service_name_len = uint64(length) rsa.Service_name_len = uint64(length)
} }
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
func Poll(fds []PollFd, timeout int) (n int, err error) {
if len(fds) == 0 {
return poll(nil, 0, timeout)
}
return poll(&fds[0], len(fds), timeout)
}
//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) //sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error { func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {

View File

@ -19,36 +19,6 @@ func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: int32(sec), Usec: int32(usec)} return Timeval{Sec: int32(sec), Usec: int32(usec)}
} }
//sysnb pipe(p *[2]_C_int) (err error)
func Pipe(p []int) (err error) {
if len(p) != 2 {
return EINVAL
}
var pp [2]_C_int
// Try pipe2 first for Android O, then try pipe for kernel 2.6.23.
err = pipe2(&pp, 0)
if err == ENOSYS {
err = pipe(&pp)
}
p[0] = int(pp[0])
p[1] = int(pp[1])
return
}
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
func Pipe2(p []int, flags int) (err error) {
if len(p) != 2 {
return EINVAL
}
var pp [2]_C_int
err = pipe2(&pp, flags)
p[0] = int(pp[0])
p[1] = int(pp[1])
return
}
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
newoffset, errno := seek(fd, offset, whence) newoffset, errno := seek(fd, offset, whence)
if errno != 0 { if errno != 0 {
@ -57,7 +27,6 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
return newoffset, nil return newoffset, nil
} }
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) //sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) //sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) //sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@ -76,8 +45,6 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
// 64-bit file system and 32-bit uid calls // 64-bit file system and 32-bit uid calls
// (16-bit uid calls are not always supported in newer kernels) // (16-bit uid calls are not always supported in newer kernels)
//sys dup2(oldfd int, newfd int) (err error)
//sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32 //sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64 //sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
@ -86,7 +53,6 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
//sysnb Geteuid() (euid int) = SYS_GETEUID32 //sysnb Geteuid() (euid int) = SYS_GETEUID32
//sysnb Getgid() (gid int) = SYS_GETGID32 //sysnb Getgid() (gid int) = SYS_GETGID32
//sysnb Getuid() (uid int) = SYS_GETUID32 //sysnb Getuid() (uid int) = SYS_GETUID32
//sysnb InotifyInit() (fd int, err error)
//sys Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32 //sys Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
//sys Listen(s int, n int) (err error) //sys Listen(s int, n int) (err error)
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64 //sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
@ -130,8 +96,8 @@ func Utime(path string, buf *Utimbuf) error {
//sys utimes(path string, times *[2]Timeval) (err error) //sys utimes(path string, times *[2]Timeval) (err error)
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 //sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 //sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64 //sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
//sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64 //sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
@ -260,15 +226,6 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
rsa.Service_name_len = uint32(length) rsa.Service_name_len = uint32(length)
} }
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
func Poll(fds []PollFd, timeout int) (n int, err error) {
if len(fds) == 0 {
return poll(nil, 0, timeout)
}
return poll(&fds[0], len(fds), timeout)
}
//sys armSyncFileRange(fd int, flags int, off int64, n int64) (err error) = SYS_ARM_SYNC_FILE_RANGE //sys armSyncFileRange(fd int, flags int, off int64, n int64) (err error) = SYS_ARM_SYNC_FILE_RANGE
func SyncFileRange(fd int, off int64, n int64, flags int) error { func SyncFileRange(fd int, off int64, n int64, flags int) error {

View File

@ -9,13 +9,6 @@ package unix
import "unsafe" import "unsafe"
func EpollCreate(size int) (fd int, err error) {
if size <= 0 {
return -1, EINVAL
}
return EpollCreate1(0)
}
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
//sys Fchown(fd int, uid int, gid int) (err error) //sys Fchown(fd int, uid int, gid int) (err error)
@ -29,8 +22,9 @@ func EpollCreate(size int) (fd int, err error) {
//sysnb getrlimit(resource int, rlim *Rlimit) (err error) //sysnb getrlimit(resource int, rlim *Rlimit) (err error)
//sysnb Getuid() (uid int) //sysnb Getuid() (uid int)
//sys Listen(s int, n int) (err error) //sys Listen(s int, n int) (err error)
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 //sys MemfdSecret(flags int) (fd int, err error)
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 //sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
//sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK //sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
@ -73,7 +67,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
return ENOSYS return ENOSYS
} }
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) //sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) //sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) //sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@ -145,30 +138,6 @@ func utimes(path string, tv *[2]Timeval) (err error) {
return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0) return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
} }
func Pipe(p []int) (err error) {
if len(p) != 2 {
return EINVAL
}
var pp [2]_C_int
err = pipe2(&pp, 0)
p[0] = int(pp[0])
p[1] = int(pp[1])
return
}
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
func Pipe2(p []int, flags int) (err error) {
if len(p) != 2 {
return EINVAL
}
var pp [2]_C_int
err = pipe2(&pp, flags)
p[0] = int(pp[0])
p[1] = int(pp[1])
return
}
// Getrlimit prefers the prlimit64 system call. See issue 38604. // Getrlimit prefers the prlimit64 system call. See issue 38604.
func Getrlimit(resource int, rlim *Rlimit) error { func Getrlimit(resource int, rlim *Rlimit) error {
err := Prlimit(0, resource, nil, rlim) err := Prlimit(0, resource, nil, rlim)
@ -211,31 +180,11 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
rsa.Service_name_len = uint64(length) rsa.Service_name_len = uint64(length)
} }
func InotifyInit() (fd int, err error) {
return InotifyInit1(0)
}
// dup2 exists because func Dup3 in syscall_linux.go references
// it in an unreachable path. dup2 isn't available on arm64.
func dup2(oldfd int, newfd int) error
func Pause() error { func Pause() error {
_, err := ppoll(nil, 0, nil, nil) _, err := ppoll(nil, 0, nil, nil)
return err return err
} }
func Poll(fds []PollFd, timeout int) (n int, err error) {
var ts *Timespec
if timeout >= 0 {
ts = new(Timespec)
*ts = NsecToTimespec(int64(timeout) * 1e6)
}
if len(fds) == 0 {
return ppoll(nil, 0, ts, nil)
}
return ppoll(&fds[0], len(fds), ts, nil)
}
//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) //sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error { func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {

View File

@ -8,8 +8,6 @@
package unix package unix
//sys dup2(oldfd int, newfd int) (err error)
//sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
//sys Fchown(fd int, uid int, gid int) (err error) //sys Fchown(fd int, uid int, gid int) (err error)
@ -23,8 +21,8 @@ package unix
//sys Lchown(path string, uid int, gid int) (err error) //sys Lchown(path string, uid int, gid int) (err error)
//sys Listen(s int, n int) (err error) //sys Listen(s int, n int) (err error)
//sys Pause() (err error) //sys Pause() (err error)
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 //sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 //sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK //sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
@ -50,7 +48,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error) //sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
//sys Truncate(path string, length int64) (err error) //sys Truncate(path string, length int64) (err error)
//sys Ustat(dev int, ubuf *Ustat_t) (err error) //sys Ustat(dev int, ubuf *Ustat_t) (err error)
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) //sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) //sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) //sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@ -94,30 +91,6 @@ func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: sec, Usec: usec} return Timeval{Sec: sec, Usec: usec}
} }
func Pipe(p []int) (err error) {
if len(p) != 2 {
return EINVAL
}
var pp [2]_C_int
err = pipe2(&pp, 0)
p[0] = int(pp[0])
p[1] = int(pp[1])
return
}
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
func Pipe2(p []int, flags int) (err error) {
if len(p) != 2 {
return EINVAL
}
var pp [2]_C_int
err = pipe2(&pp, flags)
p[0] = int(pp[0])
p[1] = int(pp[1])
return
}
func Ioperm(from int, num int, on int) (err error) { func Ioperm(from int, num int, on int) (err error) {
return ENOSYS return ENOSYS
} }
@ -220,16 +193,3 @@ func (cmsg *Cmsghdr) SetLen(length int) {
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) { func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
rsa.Service_name_len = uint64(length) rsa.Service_name_len = uint64(length)
} }
func InotifyInit() (fd int, err error) {
return InotifyInit1(0)
}
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
func Poll(fds []PollFd, timeout int) (n int, err error) {
if len(fds) == 0 {
return poll(nil, 0, timeout)
}
return poll(&fds[0], len(fds), timeout)
}

View File

@ -15,8 +15,6 @@ import (
func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
//sys dup2(oldfd int, newfd int) (err error)
//sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
//sys Fchown(fd int, uid int, gid int) (err error) //sys Fchown(fd int, uid int, gid int) (err error)
@ -27,8 +25,8 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
//sysnb Getuid() (uid int) //sysnb Getuid() (uid int)
//sys Lchown(path string, uid int, gid int) (err error) //sys Lchown(path string, uid int, gid int) (err error)
//sys Listen(s int, n int) (err error) //sys Listen(s int, n int) (err error)
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 //sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 //sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64 //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
@ -43,7 +41,6 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error) //sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64 //sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
//sys Ustat(dev int, ubuf *Ustat_t) (err error) //sys Ustat(dev int, ubuf *Ustat_t) (err error)
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) //sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) //sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) //sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@ -60,7 +57,6 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) //sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
//sysnb InotifyInit() (fd int, err error)
//sys Ioperm(from int, num int, on int) (err error) //sys Ioperm(from int, num int, on int) (err error)
//sys Iopl(level int) (err error) //sys Iopl(level int) (err error)
@ -113,29 +109,6 @@ func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: int32(sec), Usec: int32(usec)} return Timeval{Sec: int32(sec), Usec: int32(usec)}
} }
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
func Pipe2(p []int, flags int) (err error) {
if len(p) != 2 {
return EINVAL
}
var pp [2]_C_int
err = pipe2(&pp, flags)
p[0] = int(pp[0])
p[1] = int(pp[1])
return
}
//sysnb pipe() (p1 int, p2 int, err error)
func Pipe(p []int) (err error) {
if len(p) != 2 {
return EINVAL
}
p[0], p[1], err = pipe()
return
}
//sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) //sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
@ -232,12 +205,3 @@ func (cmsg *Cmsghdr) SetLen(length int) {
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) { func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
rsa.Service_name_len = uint32(length) rsa.Service_name_len = uint32(length)
} }
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
func Poll(fds []PollFd, timeout int) (n int, err error) {
if len(fds) == 0 {
return poll(nil, 0, timeout)
}
return poll(&fds[0], len(fds), timeout)
}

View File

@ -12,8 +12,6 @@ import (
"unsafe" "unsafe"
) )
//sys dup2(oldfd int, newfd int) (err error)
//sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fchown(fd int, uid int, gid int) (err error) //sys Fchown(fd int, uid int, gid int) (err error)
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64 //sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
@ -23,15 +21,14 @@ import (
//sysnb Geteuid() (euid int) //sysnb Geteuid() (euid int)
//sysnb Getgid() (gid int) //sysnb Getgid() (gid int)
//sysnb Getuid() (uid int) //sysnb Getuid() (uid int)
//sysnb InotifyInit() (fd int, err error)
//sys Ioperm(from int, num int, on int) (err error) //sys Ioperm(from int, num int, on int) (err error)
//sys Iopl(level int) (err error) //sys Iopl(level int) (err error)
//sys Lchown(path string, uid int, gid int) (err error) //sys Lchown(path string, uid int, gid int) (err error)
//sys Listen(s int, n int) (err error) //sys Listen(s int, n int) (err error)
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64 //sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
//sys Pause() (err error) //sys Pause() (err error)
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 //sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 //sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64 //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
@ -46,7 +43,6 @@ import (
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64 //sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64 //sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
//sys Ustat(dev int, ubuf *Ustat_t) (err error) //sys Ustat(dev int, ubuf *Ustat_t) (err error)
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) //sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) //sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) //sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@ -218,41 +214,6 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
rsa.Service_name_len = uint32(length) rsa.Service_name_len = uint32(length)
} }
//sysnb pipe(p *[2]_C_int) (err error)
func Pipe(p []int) (err error) {
if len(p) != 2 {
return EINVAL
}
var pp [2]_C_int
err = pipe(&pp)
p[0] = int(pp[0])
p[1] = int(pp[1])
return
}
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
func Pipe2(p []int, flags int) (err error) {
if len(p) != 2 {
return EINVAL
}
var pp [2]_C_int
err = pipe2(&pp, flags)
p[0] = int(pp[0])
p[1] = int(pp[1])
return
}
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
func Poll(fds []PollFd, timeout int) (n int, err error) {
if len(fds) == 0 {
return poll(nil, 0, timeout)
}
return poll(&fds[0], len(fds), timeout)
}
//sys syncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2 //sys syncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2
func SyncFileRange(fd int, off int64, n int64, flags int) error { func SyncFileRange(fd int, off int64, n int64, flags int) error {

View File

@ -8,8 +8,6 @@
package unix package unix
//sys dup2(oldfd int, newfd int) (err error)
//sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
//sys Fchown(fd int, uid int, gid int) (err error) //sys Fchown(fd int, uid int, gid int) (err error)
@ -22,15 +20,14 @@ package unix
//sysnb Getgid() (gid int) //sysnb Getgid() (gid int)
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = SYS_UGETRLIMIT //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = SYS_UGETRLIMIT
//sysnb Getuid() (uid int) //sysnb Getuid() (uid int)
//sysnb InotifyInit() (fd int, err error)
//sys Ioperm(from int, num int, on int) (err error) //sys Ioperm(from int, num int, on int) (err error)
//sys Iopl(level int) (err error) //sys Iopl(level int) (err error)
//sys Lchown(path string, uid int, gid int) (err error) //sys Lchown(path string, uid int, gid int) (err error)
//sys Listen(s int, n int) (err error) //sys Listen(s int, n int) (err error)
//sys Lstat(path string, stat *Stat_t) (err error) //sys Lstat(path string, stat *Stat_t) (err error)
//sys Pause() (err error) //sys Pause() (err error)
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 //sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 //sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK //sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
@ -48,7 +45,6 @@ package unix
//sys Statfs(path string, buf *Statfs_t) (err error) //sys Statfs(path string, buf *Statfs_t) (err error)
//sys Truncate(path string, length int64) (err error) //sys Truncate(path string, length int64) (err error)
//sys Ustat(dev int, ubuf *Ustat_t) (err error) //sys Ustat(dev int, ubuf *Ustat_t) (err error)
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) //sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) //sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) //sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@ -104,41 +100,6 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
rsa.Service_name_len = uint64(length) rsa.Service_name_len = uint64(length)
} }
//sysnb pipe(p *[2]_C_int) (err error)
func Pipe(p []int) (err error) {
if len(p) != 2 {
return EINVAL
}
var pp [2]_C_int
err = pipe(&pp)
p[0] = int(pp[0])
p[1] = int(pp[1])
return
}
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
func Pipe2(p []int, flags int) (err error) {
if len(p) != 2 {
return EINVAL
}
var pp [2]_C_int
err = pipe2(&pp, flags)
p[0] = int(pp[0])
p[1] = int(pp[1])
return
}
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
func Poll(fds []PollFd, timeout int) (n int, err error) {
if len(fds) == 0 {
return poll(nil, 0, timeout)
}
return poll(&fds[0], len(fds), timeout)
}
//sys syncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2 //sys syncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2
func SyncFileRange(fd int, off int64, n int64, flags int) error { func SyncFileRange(fd int, off int64, n int64, flags int) error {

View File

@ -9,13 +9,6 @@ package unix
import "unsafe" import "unsafe"
func EpollCreate(size int) (fd int, err error) {
if size <= 0 {
return -1, EINVAL
}
return EpollCreate1(0)
}
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
//sys Fchown(fd int, uid int, gid int) (err error) //sys Fchown(fd int, uid int, gid int) (err error)
@ -29,8 +22,8 @@ func EpollCreate(size int) (fd int, err error) {
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) //sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
//sysnb Getuid() (uid int) //sysnb Getuid() (uid int)
//sys Listen(s int, n int) (err error) //sys Listen(s int, n int) (err error)
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 //sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 //sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK //sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
@ -72,7 +65,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
return ENOSYS return ENOSYS
} }
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) //sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) //sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) //sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@ -144,30 +136,6 @@ func utimes(path string, tv *[2]Timeval) (err error) {
return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0) return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
} }
func Pipe(p []int) (err error) {
if len(p) != 2 {
return EINVAL
}
var pp [2]_C_int
err = pipe2(&pp, 0)
p[0] = int(pp[0])
p[1] = int(pp[1])
return
}
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
func Pipe2(p []int, flags int) (err error) {
if len(p) != 2 {
return EINVAL
}
var pp [2]_C_int
err = pipe2(&pp, flags)
p[0] = int(pp[0])
p[1] = int(pp[1])
return
}
func (r *PtraceRegs) PC() uint64 { return r.Pc } func (r *PtraceRegs) PC() uint64 { return r.Pc }
func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc } func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }
@ -192,27 +160,11 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
rsa.Service_name_len = uint64(length) rsa.Service_name_len = uint64(length)
} }
func InotifyInit() (fd int, err error) {
return InotifyInit1(0)
}
func Pause() error { func Pause() error {
_, err := ppoll(nil, 0, nil, nil) _, err := ppoll(nil, 0, nil, nil)
return err return err
} }
func Poll(fds []PollFd, timeout int) (n int, err error) {
var ts *Timespec
if timeout >= 0 {
ts = new(Timespec)
*ts = NsecToTimespec(int64(timeout) * 1e6)
}
if len(fds) == 0 {
return ppoll(nil, 0, ts, nil)
}
return ppoll(&fds[0], len(fds), ts, nil)
}
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
return Renameat2(olddirfd, oldpath, newdirfd, newpath, 0) return Renameat2(olddirfd, oldpath, newdirfd, newpath, 0)
} }
@ -229,7 +181,3 @@ func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error
} }
return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags) return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
} }
// dup2 exists because func Dup3 in syscall_linux.go references
// it in an unreachable path. dup2 isn't available on arm64.
func dup2(oldfd int, newfd int) error

View File

@ -11,8 +11,6 @@ import (
"unsafe" "unsafe"
) )
//sys dup2(oldfd int, newfd int) (err error)
//sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
//sys Fchown(fd int, uid int, gid int) (err error) //sys Fchown(fd int, uid int, gid int) (err error)
@ -25,12 +23,11 @@ import (
//sysnb Getgid() (gid int) //sysnb Getgid() (gid int)
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) //sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
//sysnb Getuid() (uid int) //sysnb Getuid() (uid int)
//sysnb InotifyInit() (fd int, err error)
//sys Lchown(path string, uid int, gid int) (err error) //sys Lchown(path string, uid int, gid int) (err error)
//sys Lstat(path string, stat *Stat_t) (err error) //sys Lstat(path string, stat *Stat_t) (err error)
//sys Pause() (err error) //sys Pause() (err error)
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 //sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 //sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK //sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
@ -77,30 +74,6 @@ func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: sec, Usec: usec} return Timeval{Sec: sec, Usec: usec}
} }
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
func Pipe(p []int) (err error) {
if len(p) != 2 {
return EINVAL
}
var pp [2]_C_int
err = pipe2(&pp, 0) // pipe2 is the same as pipe when flags are set to 0.
p[0] = int(pp[0])
p[1] = int(pp[1])
return
}
func Pipe2(p []int, flags int) (err error) {
if len(p) != 2 {
return EINVAL
}
var pp [2]_C_int
err = pipe2(&pp, flags)
p[0] = int(pp[0])
p[1] = int(pp[1])
return
}
func Ioperm(from int, num int, on int) (err error) { func Ioperm(from int, num int, on int) (err error) {
return ENOSYS return ENOSYS
} }
@ -172,15 +145,6 @@ const (
netSendMMsg = 20 netSendMMsg = 20
) )
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (int, error) {
args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))}
fd, _, err := Syscall(SYS_SOCKETCALL, netAccept, uintptr(unsafe.Pointer(&args)), 0)
if err != 0 {
return 0, err
}
return int(fd), nil
}
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (int, error) { func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (int, error) {
args := [4]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags)} args := [4]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags)}
fd, _, err := Syscall(SYS_SOCKETCALL, netAccept4, uintptr(unsafe.Pointer(&args)), 0) fd, _, err := Syscall(SYS_SOCKETCALL, netAccept4, uintptr(unsafe.Pointer(&args)), 0)
@ -324,15 +288,6 @@ func Shutdown(s, how int) error {
return nil return nil
} }
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
func Poll(fds []PollFd, timeout int) (n int, err error) {
if len(fds) == 0 {
return poll(nil, 0, timeout)
}
return poll(&fds[0], len(fds), timeout)
}
//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) //sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error { func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {

View File

@ -9,7 +9,6 @@ package unix
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
//sys dup2(oldfd int, newfd int) (err error)
//sys Fchown(fd int, uid int, gid int) (err error) //sys Fchown(fd int, uid int, gid int) (err error)
//sys Fstat(fd int, stat *Stat_t) (err error) //sys Fstat(fd int, stat *Stat_t) (err error)
//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64 //sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
@ -20,13 +19,12 @@ package unix
//sysnb Getgid() (gid int) //sysnb Getgid() (gid int)
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) //sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
//sysnb Getuid() (uid int) //sysnb Getuid() (uid int)
//sysnb InotifyInit() (fd int, err error)
//sys Lchown(path string, uid int, gid int) (err error) //sys Lchown(path string, uid int, gid int) (err error)
//sys Listen(s int, n int) (err error) //sys Listen(s int, n int) (err error)
//sys Lstat(path string, stat *Stat_t) (err error) //sys Lstat(path string, stat *Stat_t) (err error)
//sys Pause() (err error) //sys Pause() (err error)
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 //sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 //sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK //sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
@ -44,7 +42,6 @@ package unix
//sys Statfs(path string, buf *Statfs_t) (err error) //sys Statfs(path string, buf *Statfs_t) (err error)
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error) //sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
//sys Truncate(path string, length int64) (err error) //sys Truncate(path string, length int64) (err error)
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) //sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) //sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) //sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@ -119,38 +116,3 @@ func (cmsg *Cmsghdr) SetLen(length int) {
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) { func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
rsa.Service_name_len = uint64(length) rsa.Service_name_len = uint64(length)
} }
//sysnb pipe(p *[2]_C_int) (err error)
func Pipe(p []int) (err error) {
if len(p) != 2 {
return EINVAL
}
var pp [2]_C_int
err = pipe(&pp)
p[0] = int(pp[0])
p[1] = int(pp[1])
return
}
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
func Pipe2(p []int, flags int) (err error) {
if len(p) != 2 {
return EINVAL
}
var pp [2]_C_int
err = pipe2(&pp, flags)
p[0] = int(pp[0])
p[1] = int(pp[1])
return
}
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
func Poll(fds []PollFd, timeout int) (n int, err error) {
if len(fds) == 0 {
return poll(nil, 0, timeout)
}
return poll(&fds[0], len(fds), timeout)
}

View File

@ -110,14 +110,8 @@ func direntNamlen(buf []byte) (uint64, bool) {
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen)) return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
} }
//sysnb pipe() (fd1 int, fd2 int, err error)
func Pipe(p []int) (err error) { func Pipe(p []int) (err error) {
if len(p) != 2 { return Pipe2(p, 0)
return EINVAL
}
p[0], p[1], err = pipe()
return
} }
//sysnb pipe2(p *[2]_C_int, flags int) (err error) //sysnb pipe2(p *[2]_C_int, flags int) (err error)
@ -128,8 +122,10 @@ func Pipe2(p []int, flags int) error {
} }
var pp [2]_C_int var pp [2]_C_int
err := pipe2(&pp, flags) err := pipe2(&pp, flags)
p[0] = int(pp[0]) if err == nil {
p[1] = int(pp[1]) p[0] = int(pp[0])
p[1] = int(pp[1])
}
return err return err
} }
@ -167,11 +163,6 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
return -1, ENOSYS return -1, ENOSYS
} }
func setattrlistTimes(path string, times []Timespec, flags int) error {
// used on Darwin for UtimesNano
return ENOSYS
}
//sys ioctl(fd int, req uint, arg uintptr) (err error) //sys ioctl(fd int, req uint, arg uintptr) (err error)
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL //sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
@ -317,8 +308,8 @@ func Statvfs(path string, buf *Statvfs_t) (err error) {
//sys Open(path string, mode int, perm uint32) (fd int, err error) //sys Open(path string, mode int, perm uint32) (fd int, err error)
//sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) //sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error)
//sys Pathconf(path string, name int) (val int, err error) //sys Pathconf(path string, name int) (val int, err error)
//sys Pread(fd int, p []byte, offset int64) (n int, err error) //sys pread(fd int, p []byte, offset int64) (n int, err error)
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) //sys pwrite(fd int, p []byte, offset int64) (n int, err error)
//sys read(fd int, p []byte) (n int, err error) //sys read(fd int, p []byte) (n int, err error)
//sys Readlink(path string, buf []byte) (n int, err error) //sys Readlink(path string, buf []byte) (n int, err error)
//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error) //sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)

View File

@ -87,8 +87,10 @@ func Pipe2(p []int, flags int) error {
} }
var pp [2]_C_int var pp [2]_C_int
err := pipe2(&pp, flags) err := pipe2(&pp, flags)
p[0] = int(pp[0]) if err == nil {
p[1] = int(pp[1]) p[0] = int(pp[0])
p[1] = int(pp[1])
}
return err return err
} }
@ -147,11 +149,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
return return
} }
func setattrlistTimes(path string, times []Timespec, flags int) error {
// used on Darwin for UtimesNano
return ENOSYS
}
//sys ioctl(fd int, req uint, arg uintptr) (err error) //sys ioctl(fd int, req uint, arg uintptr) (err error)
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL //sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
@ -272,8 +269,8 @@ func Uname(uname *Utsname) error {
//sys Open(path string, mode int, perm uint32) (fd int, err error) //sys Open(path string, mode int, perm uint32) (fd int, err error)
//sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) //sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error)
//sys Pathconf(path string, name int) (val int, err error) //sys Pathconf(path string, name int) (val int, err error)
//sys Pread(fd int, p []byte, offset int64) (n int, err error) //sys pread(fd int, p []byte, offset int64) (n int, err error)
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) //sys pwrite(fd int, p []byte, offset int64) (n int, err error)
//sys read(fd int, p []byte) (n int, err error) //sys read(fd int, p []byte) (n int, err error)
//sys Readlink(path string, buf []byte) (n int, err error) //sys Readlink(path string, buf []byte) (n int, err error)
//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error) //sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)

View File

@ -66,8 +66,10 @@ func Pipe(p []int) (err error) {
if n != 0 { if n != 0 {
return err return err
} }
p[0] = int(pp[0]) if err == nil {
p[1] = int(pp[1]) p[0] = int(pp[0])
p[1] = int(pp[1])
}
return nil return nil
} }
@ -79,8 +81,10 @@ func Pipe2(p []int, flags int) error {
} }
var pp [2]_C_int var pp [2]_C_int
err := pipe2(&pp, flags) err := pipe2(&pp, flags)
p[0] = int(pp[0]) if err == nil {
p[1] = int(pp[1]) p[0] = int(pp[0])
p[1] = int(pp[1])
}
return err return err
} }
@ -92,9 +96,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port)) p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
p[0] = byte(sa.Port >> 8) p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port) p[1] = byte(sa.Port)
for i := 0; i < len(sa.Addr); i++ { sa.raw.Addr = sa.Addr
sa.raw.Addr[i] = sa.Addr[i]
}
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
} }
@ -107,9 +109,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
p[0] = byte(sa.Port >> 8) p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port) p[1] = byte(sa.Port)
sa.raw.Scope_id = sa.ZoneId sa.raw.Scope_id = sa.ZoneId
for i := 0; i < len(sa.Addr); i++ { sa.raw.Addr = sa.Addr
sa.raw.Addr[i] = sa.Addr[i]
}
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
} }
@ -417,9 +417,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
sa := new(SockaddrInet4) sa := new(SockaddrInet4)
p := (*[2]byte)(unsafe.Pointer(&pp.Port)) p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1]) sa.Port = int(p[0])<<8 + int(p[1])
for i := 0; i < len(sa.Addr); i++ { sa.Addr = pp.Addr
sa.Addr[i] = pp.Addr[i]
}
return sa, nil return sa, nil
case AF_INET6: case AF_INET6:
@ -428,9 +426,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
p := (*[2]byte)(unsafe.Pointer(&pp.Port)) p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1]) sa.Port = int(p[0])<<8 + int(p[1])
sa.ZoneId = pp.Scope_id sa.ZoneId = pp.Scope_id
for i := 0; i < len(sa.Addr); i++ { sa.Addr = pp.Addr
sa.Addr[i] = pp.Addr[i]
}
return sa, nil return sa, nil
} }
return nil, EAFNOSUPPORT return nil, EAFNOSUPPORT
@ -455,10 +451,9 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) {
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_recvmsg //sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_recvmsg
func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) { func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
var msg Msghdr var msg Msghdr
var rsa RawSockaddrAny msg.Name = (*byte)(unsafe.Pointer(rsa))
msg.Name = (*byte)(unsafe.Pointer(&rsa))
msg.Namelen = uint32(SizeofSockaddrAny) msg.Namelen = uint32(SizeofSockaddrAny)
var iov Iovec var iov Iovec
if len(p) > 0 { if len(p) > 0 {
@ -480,29 +475,12 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from
return return
} }
oobn = int(msg.Accrightslen) oobn = int(msg.Accrightslen)
// source address is only specified if the socket is unconnected
if rsa.Addr.Family != AF_UNSPEC {
from, err = anyToSockaddr(fd, &rsa)
}
return
}
func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
_, err = SendmsgN(fd, p, oob, to, flags)
return return
} }
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_sendmsg //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_sendmsg
func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) { func sendmsgN(fd int, p, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
var ptr unsafe.Pointer
var salen _Socklen
if to != nil {
ptr, salen, err = to.sockaddr()
if err != nil {
return 0, err
}
}
var msg Msghdr var msg Msghdr
msg.Name = (*byte)(unsafe.Pointer(ptr)) msg.Name = (*byte)(unsafe.Pointer(ptr))
msg.Namelen = uint32(salen) msg.Namelen = uint32(salen)
@ -665,8 +643,8 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) //sys Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
//sys Pathconf(path string, name int) (val int, err error) //sys Pathconf(path string, name int) (val int, err error)
//sys Pause() (err error) //sys Pause() (err error)
//sys Pread(fd int, p []byte, offset int64) (n int, err error) //sys pread(fd int, p []byte, offset int64) (n int, err error)
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) //sys pwrite(fd int, p []byte, offset int64) (n int, err error)
//sys read(fd int, p []byte) (n int, err error) //sys read(fd int, p []byte) (n int, err error)
//sys Readlink(path string, buf []byte) (n int, err error) //sys Readlink(path string, buf []byte) (n int, err error)
//sys Rename(from string, to string) (err error) //sys Rename(from string, to string) (err error)
@ -759,8 +737,20 @@ type fileObjCookie struct {
type EventPort struct { type EventPort struct {
port int port int
mu sync.Mutex mu sync.Mutex
fds map[uintptr]interface{} fds map[uintptr]*fileObjCookie
paths map[string]*fileObjCookie paths map[string]*fileObjCookie
// The user cookie presents an interesting challenge from a memory management perspective.
// There are two paths by which we can discover that it is no longer in use:
// 1. The user calls port_dissociate before any events fire
// 2. An event fires and we return it to the user
// The tricky situation is if the event has fired in the kernel but
// the user hasn't requested/received it yet.
// If the user wants to port_dissociate before the event has been processed,
// we should handle things gracefully. To do so, we need to keep an extra
// reference to the cookie around until the event is processed
// thus the otherwise seemingly extraneous "cookies" map
// The key of this map is a pointer to the corresponding &fCookie.cookie
cookies map[*interface{}]*fileObjCookie
} }
// PortEvent is an abstraction of the port_event C struct. // PortEvent is an abstraction of the port_event C struct.
@ -784,9 +774,10 @@ func NewEventPort() (*EventPort, error) {
return nil, err return nil, err
} }
e := &EventPort{ e := &EventPort{
port: port, port: port,
fds: make(map[uintptr]interface{}), fds: make(map[uintptr]*fileObjCookie),
paths: make(map[string]*fileObjCookie), paths: make(map[string]*fileObjCookie),
cookies: make(map[*interface{}]*fileObjCookie),
} }
return e, nil return e, nil
} }
@ -801,9 +792,13 @@ func NewEventPort() (*EventPort, error) {
func (e *EventPort) Close() error { func (e *EventPort) Close() error {
e.mu.Lock() e.mu.Lock()
defer e.mu.Unlock() defer e.mu.Unlock()
err := Close(e.port)
if err != nil {
return err
}
e.fds = nil e.fds = nil
e.paths = nil e.paths = nil
return Close(e.port) return nil
} }
// PathIsWatched checks to see if path is associated with this EventPort. // PathIsWatched checks to see if path is associated with this EventPort.
@ -840,6 +835,7 @@ func (e *EventPort) AssociatePath(path string, stat os.FileInfo, events int, coo
return err return err
} }
e.paths[path] = fCookie e.paths[path] = fCookie
e.cookies[&fCookie.cookie] = fCookie
return nil return nil
} }
@ -852,11 +848,19 @@ func (e *EventPort) DissociatePath(path string) error {
return fmt.Errorf("%v is not associated with this Event Port", path) return fmt.Errorf("%v is not associated with this Event Port", path)
} }
_, err := port_dissociate(e.port, PORT_SOURCE_FILE, uintptr(unsafe.Pointer(f.fobj))) _, err := port_dissociate(e.port, PORT_SOURCE_FILE, uintptr(unsafe.Pointer(f.fobj)))
if err != nil { // If the path is no longer associated with this event port (ENOENT)
// we should delete it from our map. We can still return ENOENT to the caller.
// But we need to save the cookie
if err != nil && err != ENOENT {
return err return err
} }
if err == nil {
// dissociate was successful, safe to delete the cookie
fCookie := e.paths[path]
delete(e.cookies, &fCookie.cookie)
}
delete(e.paths, path) delete(e.paths, path)
return nil return err
} }
// AssociateFd wraps calls to port_associate(3c) on file descriptors. // AssociateFd wraps calls to port_associate(3c) on file descriptors.
@ -866,12 +870,13 @@ func (e *EventPort) AssociateFd(fd uintptr, events int, cookie interface{}) erro
if _, found := e.fds[fd]; found { if _, found := e.fds[fd]; found {
return fmt.Errorf("%v is already associated with this Event Port", fd) return fmt.Errorf("%v is already associated with this Event Port", fd)
} }
pcookie := &cookie fCookie := &fileObjCookie{nil, cookie}
_, err := port_associate(e.port, PORT_SOURCE_FD, fd, events, (*byte)(unsafe.Pointer(pcookie))) _, err := port_associate(e.port, PORT_SOURCE_FD, fd, events, (*byte)(unsafe.Pointer(&fCookie.cookie)))
if err != nil { if err != nil {
return err return err
} }
e.fds[fd] = pcookie e.fds[fd] = fCookie
e.cookies[&fCookie.cookie] = fCookie
return nil return nil
} }
@ -884,11 +889,16 @@ func (e *EventPort) DissociateFd(fd uintptr) error {
return fmt.Errorf("%v is not associated with this Event Port", fd) return fmt.Errorf("%v is not associated with this Event Port", fd)
} }
_, err := port_dissociate(e.port, PORT_SOURCE_FD, fd) _, err := port_dissociate(e.port, PORT_SOURCE_FD, fd)
if err != nil { if err != nil && err != ENOENT {
return err return err
} }
if err == nil {
// dissociate was successful, safe to delete the cookie
fCookie := e.fds[fd]
delete(e.cookies, &fCookie.cookie)
}
delete(e.fds, fd) delete(e.fds, fd)
return nil return err
} }
func createFileObj(name string, stat os.FileInfo) (*fileObj, error) { func createFileObj(name string, stat os.FileInfo) (*fileObj, error) {
@ -916,26 +926,48 @@ func (e *EventPort) GetOne(t *Timespec) (*PortEvent, error) {
return nil, err return nil, err
} }
p := new(PortEvent) p := new(PortEvent)
p.Events = pe.Events
p.Source = pe.Source
e.mu.Lock() e.mu.Lock()
defer e.mu.Unlock() defer e.mu.Unlock()
switch pe.Source { e.peIntToExt(pe, p)
case PORT_SOURCE_FD:
p.Fd = uintptr(pe.Object)
cookie := (*interface{})(unsafe.Pointer(pe.User))
p.Cookie = *cookie
delete(e.fds, p.Fd)
case PORT_SOURCE_FILE:
p.fobj = (*fileObj)(unsafe.Pointer(uintptr(pe.Object)))
p.Path = BytePtrToString((*byte)(unsafe.Pointer(p.fobj.Name)))
cookie := (*interface{})(unsafe.Pointer(pe.User))
p.Cookie = *cookie
delete(e.paths, p.Path)
}
return p, nil return p, nil
} }
// peIntToExt converts a cgo portEvent struct into the friendlier PortEvent
// NOTE: Always call this function while holding the e.mu mutex
func (e *EventPort) peIntToExt(peInt *portEvent, peExt *PortEvent) {
peExt.Events = peInt.Events
peExt.Source = peInt.Source
cookie := (*interface{})(unsafe.Pointer(peInt.User))
peExt.Cookie = *cookie
switch peInt.Source {
case PORT_SOURCE_FD:
delete(e.cookies, cookie)
peExt.Fd = uintptr(peInt.Object)
// Only remove the fds entry if it exists and this cookie matches
if fobj, ok := e.fds[peExt.Fd]; ok {
if &fobj.cookie == cookie {
delete(e.fds, peExt.Fd)
}
}
case PORT_SOURCE_FILE:
if fCookie, ok := e.cookies[cookie]; ok && uintptr(unsafe.Pointer(fCookie.fobj)) == uintptr(peInt.Object) {
// Use our stashed reference rather than using unsafe on what we got back
// the unsafe version would be (*fileObj)(unsafe.Pointer(uintptr(peInt.Object)))
peExt.fobj = fCookie.fobj
} else {
panic("mismanaged memory")
}
delete(e.cookies, cookie)
peExt.Path = BytePtrToString((*byte)(unsafe.Pointer(peExt.fobj.Name)))
// Only remove the paths entry if it exists and this cookie matches
if fobj, ok := e.paths[peExt.Path]; ok {
if &fobj.cookie == cookie {
delete(e.paths, peExt.Path)
}
}
}
}
// Pending wraps port_getn(3c) and returns how many events are pending. // Pending wraps port_getn(3c) and returns how many events are pending.
func (e *EventPort) Pending() (int, error) { func (e *EventPort) Pending() (int, error) {
var n uint32 = 0 var n uint32 = 0
@ -966,21 +998,7 @@ func (e *EventPort) Get(s []PortEvent, min int, timeout *Timespec) (int, error)
e.mu.Lock() e.mu.Lock()
defer e.mu.Unlock() defer e.mu.Unlock()
for i := 0; i < int(got); i++ { for i := 0; i < int(got); i++ {
s[i].Events = ps[i].Events e.peIntToExt(&ps[i], &s[i])
s[i].Source = ps[i].Source
switch ps[i].Source {
case PORT_SOURCE_FD:
s[i].Fd = uintptr(ps[i].Object)
cookie := (*interface{})(unsafe.Pointer(ps[i].User))
s[i].Cookie = *cookie
delete(e.fds, s[i].Fd)
case PORT_SOURCE_FILE:
s[i].fobj = (*fileObj)(unsafe.Pointer(uintptr(ps[i].Object)))
s[i].Path = BytePtrToString((*byte)(unsafe.Pointer(s[i].fobj.Name)))
cookie := (*interface{})(unsafe.Pointer(ps[i].User))
s[i].Cookie = *cookie
delete(e.paths, s[i].Path)
}
} }
return int(got), err return int(got), err
} }

View File

@ -177,6 +177,30 @@ func Write(fd int, p []byte) (n int, err error) {
return return
} }
func Pread(fd int, p []byte, offset int64) (n int, err error) {
n, err = pread(fd, p, offset)
if raceenabled {
if n > 0 {
raceWriteRange(unsafe.Pointer(&p[0]), n)
}
if err == nil {
raceAcquire(unsafe.Pointer(&ioSync))
}
}
return
}
func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
if raceenabled {
raceReleaseMerge(unsafe.Pointer(&ioSync))
}
n, err = pwrite(fd, p, offset)
if raceenabled && n > 0 {
raceReadRange(unsafe.Pointer(&p[0]), n)
}
return
}
// For testing: clients can set this flag to force // For testing: clients can set this flag to force
// creation of IPv6 sockets to return EAFNOSUPPORT. // creation of IPv6 sockets to return EAFNOSUPPORT.
var SocketDisableIPv6 bool var SocketDisableIPv6 bool
@ -313,6 +337,33 @@ func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) {
return return
} }
func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
var rsa RawSockaddrAny
n, oobn, recvflags, err = recvmsgRaw(fd, p, oob, flags, &rsa)
// source address is only specified if the socket is unconnected
if rsa.Addr.Family != AF_UNSPEC {
from, err = anyToSockaddr(fd, &rsa)
}
return
}
func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
_, err = SendmsgN(fd, p, oob, to, flags)
return
}
func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
var ptr unsafe.Pointer
var salen _Socklen
if to != nil {
ptr, salen, err = to.sockaddr()
if err != nil {
return 0, err
}
}
return sendmsgN(fd, p, oob, ptr, salen, flags)
}
func Send(s int, buf []byte, flags int) (err error) { func Send(s int, buf []byte, flags int) (err error) {
return sendto(s, buf, flags, nil, 0) return sendto(s, buf, flags, nil, 0)
} }

View File

@ -67,9 +67,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port)) p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
p[0] = byte(sa.Port >> 8) p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port) p[1] = byte(sa.Port)
for i := 0; i < len(sa.Addr); i++ { sa.raw.Addr = sa.Addr
sa.raw.Addr[i] = sa.Addr[i]
}
return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
} }
@ -83,9 +81,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
p[0] = byte(sa.Port >> 8) p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port) p[1] = byte(sa.Port)
sa.raw.Scope_id = sa.ZoneId sa.raw.Scope_id = sa.ZoneId
for i := 0; i < len(sa.Addr); i++ { sa.raw.Addr = sa.Addr
sa.raw.Addr[i] = sa.Addr[i]
}
return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
} }
@ -144,9 +140,7 @@ func anyToSockaddr(_ int, rsa *RawSockaddrAny) (Sockaddr, error) {
sa := new(SockaddrInet4) sa := new(SockaddrInet4)
p := (*[2]byte)(unsafe.Pointer(&pp.Port)) p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1]) sa.Port = int(p[0])<<8 + int(p[1])
for i := 0; i < len(sa.Addr); i++ { sa.Addr = pp.Addr
sa.Addr[i] = pp.Addr[i]
}
return sa, nil return sa, nil
case AF_INET6: case AF_INET6:
@ -155,9 +149,7 @@ func anyToSockaddr(_ int, rsa *RawSockaddrAny) (Sockaddr, error) {
p := (*[2]byte)(unsafe.Pointer(&pp.Port)) p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1]) sa.Port = int(p[0])<<8 + int(p[1])
sa.ZoneId = pp.Scope_id sa.ZoneId = pp.Scope_id
for i := 0; i < len(sa.Addr); i++ { sa.Addr = pp.Addr
sa.Addr[i] = pp.Addr[i]
}
return sa, nil return sa, nil
} }
return nil, EAFNOSUPPORT return nil, EAFNOSUPPORT
@ -587,8 +579,10 @@ func Pipe(p []int) (err error) {
} }
var pp [2]_C_int var pp [2]_C_int
err = pipe(&pp) err = pipe(&pp)
p[0] = int(pp[0]) if err == nil {
p[1] = int(pp[1]) p[0] = int(pp[0])
p[1] = int(pp[1])
}
return return
} }

21
vendor/golang.org/x/sys/unix/sysvshm_linux.go generated vendored Normal file
View File

@ -0,0 +1,21 @@
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build linux
// +build linux
package unix
import "runtime"
// SysvShmCtl performs control operations on the shared memory segment
// specified by id.
func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {
if runtime.GOARCH == "arm" ||
runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" {
cmd |= ipc_64
}
return shmctl(id, cmd, desc)
}

61
vendor/golang.org/x/sys/unix/sysvshm_unix.go generated vendored Normal file
View File

@ -0,0 +1,61 @@
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build (darwin && !ios) || linux
// +build darwin,!ios linux
package unix
import (
"unsafe"
"golang.org/x/sys/internal/unsafeheader"
)
// SysvShmAttach attaches the Sysv shared memory segment associated with the
// shared memory identifier id.
func SysvShmAttach(id int, addr uintptr, flag int) ([]byte, error) {
addr, errno := shmat(id, addr, flag)
if errno != nil {
return nil, errno
}
// Retrieve the size of the shared memory to enable slice creation
var info SysvShmDesc
_, err := SysvShmCtl(id, IPC_STAT, &info)
if err != nil {
// release the shared memory if we can't find the size
// ignoring error from shmdt as there's nothing sensible to return here
shmdt(addr)
return nil, err
}
// Use unsafe to convert addr into a []byte.
// TODO: convert to unsafe.Slice once we can assume Go 1.17
var b []byte
hdr := (*unsafeheader.Slice)(unsafe.Pointer(&b))
hdr.Data = unsafe.Pointer(addr)
hdr.Cap = int(info.Segsz)
hdr.Len = int(info.Segsz)
return b, nil
}
// SysvShmDetach unmaps the shared memory slice returned from SysvShmAttach.
//
// It is not safe to use the slice after calling this function.
func SysvShmDetach(data []byte) error {
if len(data) == 0 {
return EINVAL
}
return shmdt(uintptr(unsafe.Pointer(&data[0])))
}
// SysvShmGet returns the Sysv shared memory identifier associated with key.
// If the IPC_CREAT flag is specified a new segment is created.
func SysvShmGet(key, size, flag int) (id int, err error) {
return shmget(key, size, flag)
}

14
vendor/golang.org/x/sys/unix/sysvshm_unix_other.go generated vendored Normal file
View File

@ -0,0 +1,14 @@
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build darwin && !ios
// +build darwin,!ios
package unix
// SysvShmCtl performs control operations on the shared memory segment
// specified by id.
func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {
return shmctl(id, cmd, desc)
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
// Code generated by mkmerge.go; DO NOT EDIT. // Code generated by mkmerge; DO NOT EDIT.
//go:build linux //go:build linux
// +build linux // +build linux
@ -38,7 +38,8 @@ const (
AF_KEY = 0xf AF_KEY = 0xf
AF_LLC = 0x1a AF_LLC = 0x1a
AF_LOCAL = 0x1 AF_LOCAL = 0x1
AF_MAX = 0x2d AF_MAX = 0x2e
AF_MCTP = 0x2d
AF_MPLS = 0x1c AF_MPLS = 0x1c
AF_NETBEUI = 0xd AF_NETBEUI = 0xd
AF_NETLINK = 0x10 AF_NETLINK = 0x10
@ -116,6 +117,7 @@ const (
ARPHRD_LAPB = 0x204 ARPHRD_LAPB = 0x204
ARPHRD_LOCALTLK = 0x305 ARPHRD_LOCALTLK = 0x305
ARPHRD_LOOPBACK = 0x304 ARPHRD_LOOPBACK = 0x304
ARPHRD_MCTP = 0x122
ARPHRD_METRICOM = 0x17 ARPHRD_METRICOM = 0x17
ARPHRD_NETLINK = 0x338 ARPHRD_NETLINK = 0x338
ARPHRD_NETROM = 0x0 ARPHRD_NETROM = 0x0
@ -231,6 +233,8 @@ const (
BPF_PSEUDO_FUNC = 0x4 BPF_PSEUDO_FUNC = 0x4
BPF_PSEUDO_KFUNC_CALL = 0x2 BPF_PSEUDO_KFUNC_CALL = 0x2
BPF_PSEUDO_MAP_FD = 0x1 BPF_PSEUDO_MAP_FD = 0x1
BPF_PSEUDO_MAP_IDX = 0x5
BPF_PSEUDO_MAP_IDX_VALUE = 0x6
BPF_PSEUDO_MAP_VALUE = 0x2 BPF_PSEUDO_MAP_VALUE = 0x2
BPF_RET = 0x6 BPF_RET = 0x6
BPF_RSH = 0x70 BPF_RSH = 0x70
@ -256,6 +260,17 @@ const (
BUS_USB = 0x3 BUS_USB = 0x3
BUS_VIRTUAL = 0x6 BUS_VIRTUAL = 0x6
CAN_BCM = 0x2 CAN_BCM = 0x2
CAN_CTRLMODE_3_SAMPLES = 0x4
CAN_CTRLMODE_BERR_REPORTING = 0x10
CAN_CTRLMODE_CC_LEN8_DLC = 0x100
CAN_CTRLMODE_FD = 0x20
CAN_CTRLMODE_FD_NON_ISO = 0x80
CAN_CTRLMODE_LISTENONLY = 0x2
CAN_CTRLMODE_LOOPBACK = 0x1
CAN_CTRLMODE_ONE_SHOT = 0x8
CAN_CTRLMODE_PRESUME_ACK = 0x40
CAN_CTRLMODE_TDC_AUTO = 0x200
CAN_CTRLMODE_TDC_MANUAL = 0x400
CAN_EFF_FLAG = 0x80000000 CAN_EFF_FLAG = 0x80000000
CAN_EFF_ID_BITS = 0x1d CAN_EFF_ID_BITS = 0x1d
CAN_EFF_MASK = 0x1fffffff CAN_EFF_MASK = 0x1fffffff
@ -333,6 +348,7 @@ const (
CAN_RTR_FLAG = 0x40000000 CAN_RTR_FLAG = 0x40000000
CAN_SFF_ID_BITS = 0xb CAN_SFF_ID_BITS = 0xb
CAN_SFF_MASK = 0x7ff CAN_SFF_MASK = 0x7ff
CAN_TERMINATION_DISABLED = 0x0
CAN_TP16 = 0x3 CAN_TP16 = 0x3
CAN_TP20 = 0x4 CAN_TP20 = 0x4
CAP_AUDIT_CONTROL = 0x1e CAP_AUDIT_CONTROL = 0x1e
@ -377,9 +393,11 @@ const (
CAP_SYS_TIME = 0x19 CAP_SYS_TIME = 0x19
CAP_SYS_TTY_CONFIG = 0x1a CAP_SYS_TTY_CONFIG = 0x1a
CAP_WAKE_ALARM = 0x23 CAP_WAKE_ALARM = 0x23
CEPH_SUPER_MAGIC = 0xc36400
CFLUSH = 0xf CFLUSH = 0xf
CGROUP2_SUPER_MAGIC = 0x63677270 CGROUP2_SUPER_MAGIC = 0x63677270
CGROUP_SUPER_MAGIC = 0x27e0eb CGROUP_SUPER_MAGIC = 0x27e0eb
CIFS_SUPER_MAGIC = 0xff534d42
CLOCK_BOOTTIME = 0x7 CLOCK_BOOTTIME = 0x7
CLOCK_BOOTTIME_ALARM = 0x9 CLOCK_BOOTTIME_ALARM = 0x9
CLOCK_DEFAULT = 0x0 CLOCK_DEFAULT = 0x0
@ -470,6 +488,7 @@ const (
DM_DEV_WAIT = 0xc138fd08 DM_DEV_WAIT = 0xc138fd08
DM_DIR = "mapper" DM_DIR = "mapper"
DM_GET_TARGET_VERSION = 0xc138fd11 DM_GET_TARGET_VERSION = 0xc138fd11
DM_IMA_MEASUREMENT_FLAG = 0x80000
DM_INACTIVE_PRESENT_FLAG = 0x40 DM_INACTIVE_PRESENT_FLAG = 0x40
DM_INTERNAL_SUSPEND_FLAG = 0x40000 DM_INTERNAL_SUSPEND_FLAG = 0x40000
DM_IOCTL = 0xfd DM_IOCTL = 0xfd
@ -714,6 +733,7 @@ const (
ETH_P_LOOPBACK = 0x9000 ETH_P_LOOPBACK = 0x9000
ETH_P_MACSEC = 0x88e5 ETH_P_MACSEC = 0x88e5
ETH_P_MAP = 0xf9 ETH_P_MAP = 0xf9
ETH_P_MCTP = 0xfa
ETH_P_MOBITEX = 0x15 ETH_P_MOBITEX = 0x15
ETH_P_MPLS_MC = 0x8848 ETH_P_MPLS_MC = 0x8848
ETH_P_MPLS_UC = 0x8847 ETH_P_MPLS_UC = 0x8847
@ -736,6 +756,7 @@ const (
ETH_P_QINQ2 = 0x9200 ETH_P_QINQ2 = 0x9200
ETH_P_QINQ3 = 0x9300 ETH_P_QINQ3 = 0x9300
ETH_P_RARP = 0x8035 ETH_P_RARP = 0x8035
ETH_P_REALTEK = 0x8899
ETH_P_SCA = 0x6007 ETH_P_SCA = 0x6007
ETH_P_SLOW = 0x8809 ETH_P_SLOW = 0x8809
ETH_P_SNAP = 0x5 ETH_P_SNAP = 0x5
@ -749,7 +770,23 @@ const (
ETH_P_WCCP = 0x883e ETH_P_WCCP = 0x883e
ETH_P_X25 = 0x805 ETH_P_X25 = 0x805
ETH_P_XDSA = 0xf8 ETH_P_XDSA = 0xf8
EV_ABS = 0x3
EV_CNT = 0x20
EV_FF = 0x15
EV_FF_STATUS = 0x17
EV_KEY = 0x1
EV_LED = 0x11
EV_MAX = 0x1f
EV_MSC = 0x4
EV_PWR = 0x16
EV_REL = 0x2
EV_REP = 0x14
EV_SND = 0x12
EV_SW = 0x5
EV_SYN = 0x0
EV_VERSION = 0x10001
EXABYTE_ENABLE_NEST = 0xf0 EXABYTE_ENABLE_NEST = 0xf0
EXFAT_SUPER_MAGIC = 0x2011bab0
EXT2_SUPER_MAGIC = 0xef53 EXT2_SUPER_MAGIC = 0xef53
EXT3_SUPER_MAGIC = 0xef53 EXT3_SUPER_MAGIC = 0xef53
EXT4_SUPER_MAGIC = 0xef53 EXT4_SUPER_MAGIC = 0xef53
@ -787,11 +824,17 @@ const (
FAN_DELETE_SELF = 0x400 FAN_DELETE_SELF = 0x400
FAN_DENY = 0x2 FAN_DENY = 0x2
FAN_ENABLE_AUDIT = 0x40 FAN_ENABLE_AUDIT = 0x40
FAN_EPIDFD = -0x2
FAN_EVENT_INFO_TYPE_DFID = 0x3 FAN_EVENT_INFO_TYPE_DFID = 0x3
FAN_EVENT_INFO_TYPE_DFID_NAME = 0x2 FAN_EVENT_INFO_TYPE_DFID_NAME = 0x2
FAN_EVENT_INFO_TYPE_ERROR = 0x5
FAN_EVENT_INFO_TYPE_FID = 0x1 FAN_EVENT_INFO_TYPE_FID = 0x1
FAN_EVENT_INFO_TYPE_NEW_DFID_NAME = 0xc
FAN_EVENT_INFO_TYPE_OLD_DFID_NAME = 0xa
FAN_EVENT_INFO_TYPE_PIDFD = 0x4
FAN_EVENT_METADATA_LEN = 0x18 FAN_EVENT_METADATA_LEN = 0x18
FAN_EVENT_ON_CHILD = 0x8000000 FAN_EVENT_ON_CHILD = 0x8000000
FAN_FS_ERROR = 0x8000
FAN_MARK_ADD = 0x1 FAN_MARK_ADD = 0x1
FAN_MARK_DONT_FOLLOW = 0x4 FAN_MARK_DONT_FOLLOW = 0x4
FAN_MARK_FILESYSTEM = 0x100 FAN_MARK_FILESYSTEM = 0x100
@ -809,22 +852,34 @@ const (
FAN_MOVE_SELF = 0x800 FAN_MOVE_SELF = 0x800
FAN_NOFD = -0x1 FAN_NOFD = -0x1
FAN_NONBLOCK = 0x2 FAN_NONBLOCK = 0x2
FAN_NOPIDFD = -0x1
FAN_ONDIR = 0x40000000 FAN_ONDIR = 0x40000000
FAN_OPEN = 0x20 FAN_OPEN = 0x20
FAN_OPEN_EXEC = 0x1000 FAN_OPEN_EXEC = 0x1000
FAN_OPEN_EXEC_PERM = 0x40000 FAN_OPEN_EXEC_PERM = 0x40000
FAN_OPEN_PERM = 0x10000 FAN_OPEN_PERM = 0x10000
FAN_Q_OVERFLOW = 0x4000 FAN_Q_OVERFLOW = 0x4000
FAN_RENAME = 0x10000000
FAN_REPORT_DFID_NAME = 0xc00 FAN_REPORT_DFID_NAME = 0xc00
FAN_REPORT_DFID_NAME_TARGET = 0x1e00
FAN_REPORT_DIR_FID = 0x400 FAN_REPORT_DIR_FID = 0x400
FAN_REPORT_FID = 0x200 FAN_REPORT_FID = 0x200
FAN_REPORT_NAME = 0x800 FAN_REPORT_NAME = 0x800
FAN_REPORT_PIDFD = 0x80
FAN_REPORT_TARGET_FID = 0x1000
FAN_REPORT_TID = 0x100 FAN_REPORT_TID = 0x100
FAN_UNLIMITED_MARKS = 0x20 FAN_UNLIMITED_MARKS = 0x20
FAN_UNLIMITED_QUEUE = 0x10 FAN_UNLIMITED_QUEUE = 0x10
FD_CLOEXEC = 0x1 FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400 FD_SETSIZE = 0x400
FF0 = 0x0 FF0 = 0x0
FIB_RULE_DEV_DETACHED = 0x8
FIB_RULE_FIND_SADDR = 0x10000
FIB_RULE_IIF_DETACHED = 0x8
FIB_RULE_INVERT = 0x2
FIB_RULE_OIF_DETACHED = 0x10
FIB_RULE_PERMANENT = 0x1
FIB_RULE_UNRESOLVED = 0x4
FIDEDUPERANGE = 0xc0189436 FIDEDUPERANGE = 0xc0189436
FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8 FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
FSCRYPT_KEY_DESC_PREFIX = "fscrypt:" FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
@ -887,6 +942,7 @@ const (
FS_VERITY_METADATA_TYPE_DESCRIPTOR = 0x2 FS_VERITY_METADATA_TYPE_DESCRIPTOR = 0x2
FS_VERITY_METADATA_TYPE_MERKLE_TREE = 0x1 FS_VERITY_METADATA_TYPE_MERKLE_TREE = 0x1
FS_VERITY_METADATA_TYPE_SIGNATURE = 0x3 FS_VERITY_METADATA_TYPE_SIGNATURE = 0x3
FUSE_SUPER_MAGIC = 0x65735546
FUTEXFS_SUPER_MAGIC = 0xbad1dea FUTEXFS_SUPER_MAGIC = 0xbad1dea
F_ADD_SEALS = 0x409 F_ADD_SEALS = 0x409
F_DUPFD = 0x0 F_DUPFD = 0x0
@ -1240,9 +1296,14 @@ const (
IP_XFRM_POLICY = 0x11 IP_XFRM_POLICY = 0x11
ISOFS_SUPER_MAGIC = 0x9660 ISOFS_SUPER_MAGIC = 0x9660
ISTRIP = 0x20 ISTRIP = 0x20
ITIMER_PROF = 0x2
ITIMER_REAL = 0x0
ITIMER_VIRTUAL = 0x1
IUTF8 = 0x4000 IUTF8 = 0x4000
IXANY = 0x800 IXANY = 0x800
JFFS2_SUPER_MAGIC = 0x72b6 JFFS2_SUPER_MAGIC = 0x72b6
KCMPROTO_CONNECTED = 0x0
KCM_RECV_DISABLE = 0x1
KEXEC_ARCH_386 = 0x30000 KEXEC_ARCH_386 = 0x30000
KEXEC_ARCH_68K = 0x40000 KEXEC_ARCH_68K = 0x40000
KEXEC_ARCH_AARCH64 = 0xb70000 KEXEC_ARCH_AARCH64 = 0xb70000
@ -1331,6 +1392,20 @@ const (
KEY_SPEC_THREAD_KEYRING = -0x1 KEY_SPEC_THREAD_KEYRING = -0x1
KEY_SPEC_USER_KEYRING = -0x4 KEY_SPEC_USER_KEYRING = -0x4
KEY_SPEC_USER_SESSION_KEYRING = -0x5 KEY_SPEC_USER_SESSION_KEYRING = -0x5
LANDLOCK_ACCESS_FS_EXECUTE = 0x1
LANDLOCK_ACCESS_FS_MAKE_BLOCK = 0x800
LANDLOCK_ACCESS_FS_MAKE_CHAR = 0x40
LANDLOCK_ACCESS_FS_MAKE_DIR = 0x80
LANDLOCK_ACCESS_FS_MAKE_FIFO = 0x400
LANDLOCK_ACCESS_FS_MAKE_REG = 0x100
LANDLOCK_ACCESS_FS_MAKE_SOCK = 0x200
LANDLOCK_ACCESS_FS_MAKE_SYM = 0x1000
LANDLOCK_ACCESS_FS_READ_DIR = 0x8
LANDLOCK_ACCESS_FS_READ_FILE = 0x4
LANDLOCK_ACCESS_FS_REMOVE_DIR = 0x10
LANDLOCK_ACCESS_FS_REMOVE_FILE = 0x20
LANDLOCK_ACCESS_FS_WRITE_FILE = 0x2
LANDLOCK_CREATE_RULESET_VERSION = 0x1
LINUX_REBOOT_CMD_CAD_OFF = 0x0 LINUX_REBOOT_CMD_CAD_OFF = 0x0
LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
LINUX_REBOOT_CMD_HALT = 0xcdef0123 LINUX_REBOOT_CMD_HALT = 0xcdef0123
@ -1381,6 +1456,8 @@ const (
MADV_NOHUGEPAGE = 0xf MADV_NOHUGEPAGE = 0xf
MADV_NORMAL = 0x0 MADV_NORMAL = 0x0
MADV_PAGEOUT = 0x15 MADV_PAGEOUT = 0x15
MADV_POPULATE_READ = 0x16
MADV_POPULATE_WRITE = 0x17
MADV_RANDOM = 0x1 MADV_RANDOM = 0x1
MADV_REMOVE = 0x9 MADV_REMOVE = 0x9
MADV_SEQUENTIAL = 0x2 MADV_SEQUENTIAL = 0x2
@ -1434,8 +1511,21 @@ const (
MNT_DETACH = 0x2 MNT_DETACH = 0x2
MNT_EXPIRE = 0x4 MNT_EXPIRE = 0x4
MNT_FORCE = 0x1 MNT_FORCE = 0x1
MODULE_INIT_COMPRESSED_FILE = 0x4
MODULE_INIT_IGNORE_MODVERSIONS = 0x1 MODULE_INIT_IGNORE_MODVERSIONS = 0x1
MODULE_INIT_IGNORE_VERMAGIC = 0x2 MODULE_INIT_IGNORE_VERMAGIC = 0x2
MOUNT_ATTR_IDMAP = 0x100000
MOUNT_ATTR_NOATIME = 0x10
MOUNT_ATTR_NODEV = 0x4
MOUNT_ATTR_NODIRATIME = 0x80
MOUNT_ATTR_NOEXEC = 0x8
MOUNT_ATTR_NOSUID = 0x2
MOUNT_ATTR_NOSYMFOLLOW = 0x200000
MOUNT_ATTR_RDONLY = 0x1
MOUNT_ATTR_RELATIME = 0x0
MOUNT_ATTR_SIZE_VER0 = 0x20
MOUNT_ATTR_STRICTATIME = 0x20
MOUNT_ATTR__ATIME = 0x70
MSDOS_SUPER_MAGIC = 0x4d44 MSDOS_SUPER_MAGIC = 0x4d44
MSG_BATCH = 0x40000 MSG_BATCH = 0x40000
MSG_CMSG_CLOEXEC = 0x40000000 MSG_CMSG_CLOEXEC = 0x40000000
@ -1635,11 +1725,12 @@ const (
NFNL_MSG_BATCH_END = 0x11 NFNL_MSG_BATCH_END = 0x11
NFNL_NFA_NEST = 0x8000 NFNL_NFA_NEST = 0x8000
NFNL_SUBSYS_ACCT = 0x7 NFNL_SUBSYS_ACCT = 0x7
NFNL_SUBSYS_COUNT = 0xc NFNL_SUBSYS_COUNT = 0xd
NFNL_SUBSYS_CTHELPER = 0x9 NFNL_SUBSYS_CTHELPER = 0x9
NFNL_SUBSYS_CTNETLINK = 0x1 NFNL_SUBSYS_CTNETLINK = 0x1
NFNL_SUBSYS_CTNETLINK_EXP = 0x2 NFNL_SUBSYS_CTNETLINK_EXP = 0x2
NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8 NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
NFNL_SUBSYS_HOOK = 0xc
NFNL_SUBSYS_IPSET = 0x6 NFNL_SUBSYS_IPSET = 0x6
NFNL_SUBSYS_NFTABLES = 0xa NFNL_SUBSYS_NFTABLES = 0xa
NFNL_SUBSYS_NFT_COMPAT = 0xb NFNL_SUBSYS_NFT_COMPAT = 0xb
@ -1774,6 +1865,11 @@ const (
PERF_MEM_BLK_DATA = 0x2 PERF_MEM_BLK_DATA = 0x2
PERF_MEM_BLK_NA = 0x1 PERF_MEM_BLK_NA = 0x1
PERF_MEM_BLK_SHIFT = 0x28 PERF_MEM_BLK_SHIFT = 0x28
PERF_MEM_HOPS_0 = 0x1
PERF_MEM_HOPS_1 = 0x2
PERF_MEM_HOPS_2 = 0x3
PERF_MEM_HOPS_3 = 0x4
PERF_MEM_HOPS_SHIFT = 0x2b
PERF_MEM_LOCK_LOCKED = 0x2 PERF_MEM_LOCK_LOCKED = 0x2
PERF_MEM_LOCK_NA = 0x1 PERF_MEM_LOCK_NA = 0x1
PERF_MEM_LOCK_SHIFT = 0x18 PERF_MEM_LOCK_SHIFT = 0x18
@ -1929,6 +2025,15 @@ const (
PR_PAC_GET_ENABLED_KEYS = 0x3d PR_PAC_GET_ENABLED_KEYS = 0x3d
PR_PAC_RESET_KEYS = 0x36 PR_PAC_RESET_KEYS = 0x36
PR_PAC_SET_ENABLED_KEYS = 0x3c PR_PAC_SET_ENABLED_KEYS = 0x3c
PR_SCHED_CORE = 0x3e
PR_SCHED_CORE_CREATE = 0x1
PR_SCHED_CORE_GET = 0x0
PR_SCHED_CORE_MAX = 0x4
PR_SCHED_CORE_SCOPE_PROCESS_GROUP = 0x2
PR_SCHED_CORE_SCOPE_THREAD = 0x0
PR_SCHED_CORE_SCOPE_THREAD_GROUP = 0x1
PR_SCHED_CORE_SHARE_FROM = 0x3
PR_SCHED_CORE_SHARE_TO = 0x2
PR_SET_CHILD_SUBREAPER = 0x24 PR_SET_CHILD_SUBREAPER = 0x24
PR_SET_DUMPABLE = 0x4 PR_SET_DUMPABLE = 0x4
PR_SET_ENDIAN = 0x14 PR_SET_ENDIAN = 0x14
@ -1967,11 +2072,14 @@ const (
PR_SET_TIMING = 0xe PR_SET_TIMING = 0xe
PR_SET_TSC = 0x1a PR_SET_TSC = 0x1a
PR_SET_UNALIGN = 0x6 PR_SET_UNALIGN = 0x6
PR_SET_VMA = 0x53564d41
PR_SET_VMA_ANON_NAME = 0x0
PR_SPEC_DISABLE = 0x4 PR_SPEC_DISABLE = 0x4
PR_SPEC_DISABLE_NOEXEC = 0x10 PR_SPEC_DISABLE_NOEXEC = 0x10
PR_SPEC_ENABLE = 0x2 PR_SPEC_ENABLE = 0x2
PR_SPEC_FORCE_DISABLE = 0x8 PR_SPEC_FORCE_DISABLE = 0x8
PR_SPEC_INDIRECT_BRANCH = 0x1 PR_SPEC_INDIRECT_BRANCH = 0x1
PR_SPEC_L1D_FLUSH = 0x2
PR_SPEC_NOT_AFFECTED = 0x0 PR_SPEC_NOT_AFFECTED = 0x0
PR_SPEC_PRCTL = 0x1 PR_SPEC_PRCTL = 0x1
PR_SPEC_STORE_BYPASS = 0x0 PR_SPEC_STORE_BYPASS = 0x0
@ -2049,6 +2157,10 @@ const (
PTRACE_SYSCALL_INFO_NONE = 0x0 PTRACE_SYSCALL_INFO_NONE = 0x0
PTRACE_SYSCALL_INFO_SECCOMP = 0x3 PTRACE_SYSCALL_INFO_SECCOMP = 0x3
PTRACE_TRACEME = 0x0 PTRACE_TRACEME = 0x0
P_ALL = 0x0
P_PGID = 0x2
P_PID = 0x1
P_PIDFD = 0x3
QNX4_SUPER_MAGIC = 0x2f QNX4_SUPER_MAGIC = 0x2f
QNX6_SUPER_MAGIC = 0x68191122 QNX6_SUPER_MAGIC = 0x68191122
RAMFS_MAGIC = 0x858458f6 RAMFS_MAGIC = 0x858458f6
@ -2107,12 +2219,23 @@ const (
RTCF_NAT = 0x800000 RTCF_NAT = 0x800000
RTCF_VALVE = 0x200000 RTCF_VALVE = 0x200000
RTC_AF = 0x20 RTC_AF = 0x20
RTC_BSM_DIRECT = 0x1
RTC_BSM_DISABLED = 0x0
RTC_BSM_LEVEL = 0x2
RTC_BSM_STANDBY = 0x3
RTC_FEATURE_ALARM = 0x0 RTC_FEATURE_ALARM = 0x0
RTC_FEATURE_ALARM_RES_2S = 0x3
RTC_FEATURE_ALARM_RES_MINUTE = 0x1 RTC_FEATURE_ALARM_RES_MINUTE = 0x1
RTC_FEATURE_CNT = 0x3 RTC_FEATURE_BACKUP_SWITCH_MODE = 0x6
RTC_FEATURE_CNT = 0x7
RTC_FEATURE_CORRECTION = 0x5
RTC_FEATURE_NEED_WEEK_DAY = 0x2 RTC_FEATURE_NEED_WEEK_DAY = 0x2
RTC_FEATURE_UPDATE_INTERRUPT = 0x4
RTC_IRQF = 0x80 RTC_IRQF = 0x80
RTC_MAX_FREQ = 0x2000 RTC_MAX_FREQ = 0x2000
RTC_PARAM_BACKUP_SWITCH_MODE = 0x2
RTC_PARAM_CORRECTION = 0x1
RTC_PARAM_FEATURES = 0x0
RTC_PF = 0x40 RTC_PF = 0x40
RTC_UF = 0x10 RTC_UF = 0x10
RTF_ADDRCLASSMASK = 0xf8000000 RTF_ADDRCLASSMASK = 0xf8000000
@ -2295,6 +2418,7 @@ const (
SECCOMP_MODE_DISABLED = 0x0 SECCOMP_MODE_DISABLED = 0x0
SECCOMP_MODE_FILTER = 0x2 SECCOMP_MODE_FILTER = 0x2
SECCOMP_MODE_STRICT = 0x1 SECCOMP_MODE_STRICT = 0x1
SECRETMEM_MAGIC = 0x5345434d
SECURITYFS_MAGIC = 0x73636673 SECURITYFS_MAGIC = 0x73636673
SEEK_CUR = 0x1 SEEK_CUR = 0x1
SEEK_DATA = 0x3 SEEK_DATA = 0x3
@ -2362,6 +2486,9 @@ const (
SIOCGSTAMPNS = 0x8907 SIOCGSTAMPNS = 0x8907
SIOCGSTAMPNS_OLD = 0x8907 SIOCGSTAMPNS_OLD = 0x8907
SIOCGSTAMP_OLD = 0x8906 SIOCGSTAMP_OLD = 0x8906
SIOCKCMATTACH = 0x89e0
SIOCKCMCLONE = 0x89e2
SIOCKCMUNATTACH = 0x89e1
SIOCOUTQNSD = 0x894b SIOCOUTQNSD = 0x894b
SIOCPROTOPRIVATE = 0x89e0 SIOCPROTOPRIVATE = 0x89e0
SIOCRTMSG = 0x890d SIOCRTMSG = 0x890d
@ -2404,14 +2531,18 @@ const (
SMART_STATUS = 0xda SMART_STATUS = 0xda
SMART_WRITE_LOG_SECTOR = 0xd6 SMART_WRITE_LOG_SECTOR = 0xd6
SMART_WRITE_THRESHOLDS = 0xd7 SMART_WRITE_THRESHOLDS = 0xd7
SMB2_SUPER_MAGIC = 0xfe534d42
SMB_SUPER_MAGIC = 0x517b SMB_SUPER_MAGIC = 0x517b
SOCKFS_MAGIC = 0x534f434b SOCKFS_MAGIC = 0x534f434b
SOCK_BUF_LOCK_MASK = 0x3
SOCK_DCCP = 0x6 SOCK_DCCP = 0x6
SOCK_IOC_TYPE = 0x89 SOCK_IOC_TYPE = 0x89
SOCK_PACKET = 0xa SOCK_PACKET = 0xa
SOCK_RAW = 0x3 SOCK_RAW = 0x3
SOCK_RCVBUF_LOCK = 0x2
SOCK_RDM = 0x4 SOCK_RDM = 0x4
SOCK_SEQPACKET = 0x5 SOCK_SEQPACKET = 0x5
SOCK_SNDBUF_LOCK = 0x1
SOL_AAL = 0x109 SOL_AAL = 0x109
SOL_ALG = 0x117 SOL_ALG = 0x117
SOL_ATM = 0x108 SOL_ATM = 0x108
@ -2468,6 +2599,8 @@ const (
SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1 SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
SO_VM_SOCKETS_BUFFER_SIZE = 0x0 SO_VM_SOCKETS_BUFFER_SIZE = 0x0
SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6 SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
SO_VM_SOCKETS_CONNECT_TIMEOUT_NEW = 0x8
SO_VM_SOCKETS_CONNECT_TIMEOUT_OLD = 0x6
SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7 SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3 SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
SO_VM_SOCKETS_TRUSTED = 0x5 SO_VM_SOCKETS_TRUSTED = 0x5
@ -2540,7 +2673,7 @@ const (
TASKSTATS_GENL_NAME = "TASKSTATS" TASKSTATS_GENL_NAME = "TASKSTATS"
TASKSTATS_GENL_VERSION = 0x1 TASKSTATS_GENL_VERSION = 0x1
TASKSTATS_TYPE_MAX = 0x6 TASKSTATS_TYPE_MAX = 0x6
TASKSTATS_VERSION = 0xa TASKSTATS_VERSION = 0xb
TCIFLUSH = 0x0 TCIFLUSH = 0x0
TCIOFF = 0x2 TCIOFF = 0x2
TCIOFLUSH = 0x2 TCIOFLUSH = 0x2
@ -2762,6 +2895,13 @@ const (
WDIOS_TEMPPANIC = 0x4 WDIOS_TEMPPANIC = 0x4
WDIOS_UNKNOWN = -0x1 WDIOS_UNKNOWN = -0x1
WEXITED = 0x4 WEXITED = 0x4
WGALLOWEDIP_A_MAX = 0x3
WGDEVICE_A_MAX = 0x8
WGPEER_A_MAX = 0xa
WG_CMD_MAX = 0x1
WG_GENL_NAME = "wireguard"
WG_GENL_VERSION = 0x1
WG_KEY_LEN = 0x20
WIN_ACKMEDIACHANGE = 0xdb WIN_ACKMEDIACHANGE = 0xdb
WIN_CHECKPOWERMODE1 = 0xe5 WIN_CHECKPOWERMODE1 = 0xe5
WIN_CHECKPOWERMODE2 = 0x98 WIN_CHECKPOWERMODE2 = 0x98

View File

@ -5,7 +5,7 @@
// +build 386,linux // +build 386,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 /build/_const.go // cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 /build/unix/_const.go
package unix package unix
@ -250,6 +250,8 @@ const (
RTC_EPOCH_SET = 0x4004700e RTC_EPOCH_SET = 0x4004700e
RTC_IRQP_READ = 0x8004700b RTC_IRQP_READ = 0x8004700b
RTC_IRQP_SET = 0x4004700c RTC_IRQP_SET = 0x4004700c
RTC_PARAM_GET = 0x40187013
RTC_PARAM_SET = 0x40187014
RTC_PIE_OFF = 0x7006 RTC_PIE_OFF = 0x7006
RTC_PIE_ON = 0x7005 RTC_PIE_ON = 0x7005
RTC_PLL_GET = 0x801c7011 RTC_PLL_GET = 0x801c7011
@ -293,6 +295,7 @@ const (
SO_BPF_EXTENSIONS = 0x30 SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x6 SO_BROADCAST = 0x6
SO_BSDCOMPAT = 0xe SO_BSDCOMPAT = 0xe
SO_BUF_LOCK = 0x48
SO_BUSY_POLL = 0x2e SO_BUSY_POLL = 0x2e
SO_BUSY_POLL_BUDGET = 0x46 SO_BUSY_POLL_BUDGET = 0x46
SO_CNX_ADVICE = 0x35 SO_CNX_ADVICE = 0x35
@ -309,6 +312,7 @@ const (
SO_MARK = 0x24 SO_MARK = 0x24
SO_MAX_PACING_RATE = 0x2f SO_MAX_PACING_RATE = 0x2f
SO_MEMINFO = 0x37 SO_MEMINFO = 0x37
SO_NETNS_COOKIE = 0x47
SO_NOFCS = 0x2b SO_NOFCS = 0x2b
SO_OOBINLINE = 0xa SO_OOBINLINE = 0xa
SO_PASSCRED = 0x10 SO_PASSCRED = 0x10
@ -325,6 +329,7 @@ const (
SO_RCVTIMEO = 0x14 SO_RCVTIMEO = 0x14
SO_RCVTIMEO_NEW = 0x42 SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x14 SO_RCVTIMEO_OLD = 0x14
SO_RESERVE_MEM = 0x49
SO_REUSEADDR = 0x2 SO_REUSEADDR = 0x2
SO_REUSEPORT = 0xf SO_REUSEPORT = 0xf
SO_RXQ_OVFL = 0x28 SO_RXQ_OVFL = 0x28

View File

@ -5,7 +5,7 @@
// +build amd64,linux // +build amd64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 /build/_const.go // cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 /build/unix/_const.go
package unix package unix
@ -251,6 +251,8 @@ const (
RTC_EPOCH_SET = 0x4008700e RTC_EPOCH_SET = 0x4008700e
RTC_IRQP_READ = 0x8008700b RTC_IRQP_READ = 0x8008700b
RTC_IRQP_SET = 0x4008700c RTC_IRQP_SET = 0x4008700c
RTC_PARAM_GET = 0x40187013
RTC_PARAM_SET = 0x40187014
RTC_PIE_OFF = 0x7006 RTC_PIE_OFF = 0x7006
RTC_PIE_ON = 0x7005 RTC_PIE_ON = 0x7005
RTC_PLL_GET = 0x80207011 RTC_PLL_GET = 0x80207011
@ -294,6 +296,7 @@ const (
SO_BPF_EXTENSIONS = 0x30 SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x6 SO_BROADCAST = 0x6
SO_BSDCOMPAT = 0xe SO_BSDCOMPAT = 0xe
SO_BUF_LOCK = 0x48
SO_BUSY_POLL = 0x2e SO_BUSY_POLL = 0x2e
SO_BUSY_POLL_BUDGET = 0x46 SO_BUSY_POLL_BUDGET = 0x46
SO_CNX_ADVICE = 0x35 SO_CNX_ADVICE = 0x35
@ -310,6 +313,7 @@ const (
SO_MARK = 0x24 SO_MARK = 0x24
SO_MAX_PACING_RATE = 0x2f SO_MAX_PACING_RATE = 0x2f
SO_MEMINFO = 0x37 SO_MEMINFO = 0x37
SO_NETNS_COOKIE = 0x47
SO_NOFCS = 0x2b SO_NOFCS = 0x2b
SO_OOBINLINE = 0xa SO_OOBINLINE = 0xa
SO_PASSCRED = 0x10 SO_PASSCRED = 0x10
@ -326,6 +330,7 @@ const (
SO_RCVTIMEO = 0x14 SO_RCVTIMEO = 0x14
SO_RCVTIMEO_NEW = 0x42 SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x14 SO_RCVTIMEO_OLD = 0x14
SO_RESERVE_MEM = 0x49
SO_REUSEADDR = 0x2 SO_REUSEADDR = 0x2
SO_REUSEPORT = 0xf SO_REUSEPORT = 0xf
SO_RXQ_OVFL = 0x28 SO_RXQ_OVFL = 0x28

View File

@ -5,7 +5,7 @@
// +build arm,linux // +build arm,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
package unix package unix
@ -257,6 +257,8 @@ const (
RTC_EPOCH_SET = 0x4004700e RTC_EPOCH_SET = 0x4004700e
RTC_IRQP_READ = 0x8004700b RTC_IRQP_READ = 0x8004700b
RTC_IRQP_SET = 0x4004700c RTC_IRQP_SET = 0x4004700c
RTC_PARAM_GET = 0x40187013
RTC_PARAM_SET = 0x40187014
RTC_PIE_OFF = 0x7006 RTC_PIE_OFF = 0x7006
RTC_PIE_ON = 0x7005 RTC_PIE_ON = 0x7005
RTC_PLL_GET = 0x801c7011 RTC_PLL_GET = 0x801c7011
@ -300,6 +302,7 @@ const (
SO_BPF_EXTENSIONS = 0x30 SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x6 SO_BROADCAST = 0x6
SO_BSDCOMPAT = 0xe SO_BSDCOMPAT = 0xe
SO_BUF_LOCK = 0x48
SO_BUSY_POLL = 0x2e SO_BUSY_POLL = 0x2e
SO_BUSY_POLL_BUDGET = 0x46 SO_BUSY_POLL_BUDGET = 0x46
SO_CNX_ADVICE = 0x35 SO_CNX_ADVICE = 0x35
@ -316,6 +319,7 @@ const (
SO_MARK = 0x24 SO_MARK = 0x24
SO_MAX_PACING_RATE = 0x2f SO_MAX_PACING_RATE = 0x2f
SO_MEMINFO = 0x37 SO_MEMINFO = 0x37
SO_NETNS_COOKIE = 0x47
SO_NOFCS = 0x2b SO_NOFCS = 0x2b
SO_OOBINLINE = 0xa SO_OOBINLINE = 0xa
SO_PASSCRED = 0x10 SO_PASSCRED = 0x10
@ -332,6 +336,7 @@ const (
SO_RCVTIMEO = 0x14 SO_RCVTIMEO = 0x14
SO_RCVTIMEO_NEW = 0x42 SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x14 SO_RCVTIMEO_OLD = 0x14
SO_RESERVE_MEM = 0x49
SO_REUSEADDR = 0x2 SO_REUSEADDR = 0x2
SO_REUSEPORT = 0xf SO_REUSEPORT = 0xf
SO_RXQ_OVFL = 0x28 SO_RXQ_OVFL = 0x28

View File

@ -5,7 +5,7 @@
// +build arm64,linux // +build arm64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/_const.go // cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/unix/_const.go
package unix package unix
@ -247,6 +247,8 @@ const (
RTC_EPOCH_SET = 0x4008700e RTC_EPOCH_SET = 0x4008700e
RTC_IRQP_READ = 0x8008700b RTC_IRQP_READ = 0x8008700b
RTC_IRQP_SET = 0x4008700c RTC_IRQP_SET = 0x4008700c
RTC_PARAM_GET = 0x40187013
RTC_PARAM_SET = 0x40187014
RTC_PIE_OFF = 0x7006 RTC_PIE_OFF = 0x7006
RTC_PIE_ON = 0x7005 RTC_PIE_ON = 0x7005
RTC_PLL_GET = 0x80207011 RTC_PLL_GET = 0x80207011
@ -290,6 +292,7 @@ const (
SO_BPF_EXTENSIONS = 0x30 SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x6 SO_BROADCAST = 0x6
SO_BSDCOMPAT = 0xe SO_BSDCOMPAT = 0xe
SO_BUF_LOCK = 0x48
SO_BUSY_POLL = 0x2e SO_BUSY_POLL = 0x2e
SO_BUSY_POLL_BUDGET = 0x46 SO_BUSY_POLL_BUDGET = 0x46
SO_CNX_ADVICE = 0x35 SO_CNX_ADVICE = 0x35
@ -306,6 +309,7 @@ const (
SO_MARK = 0x24 SO_MARK = 0x24
SO_MAX_PACING_RATE = 0x2f SO_MAX_PACING_RATE = 0x2f
SO_MEMINFO = 0x37 SO_MEMINFO = 0x37
SO_NETNS_COOKIE = 0x47
SO_NOFCS = 0x2b SO_NOFCS = 0x2b
SO_OOBINLINE = 0xa SO_OOBINLINE = 0xa
SO_PASSCRED = 0x10 SO_PASSCRED = 0x10
@ -322,6 +326,7 @@ const (
SO_RCVTIMEO = 0x14 SO_RCVTIMEO = 0x14
SO_RCVTIMEO_NEW = 0x42 SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x14 SO_RCVTIMEO_OLD = 0x14
SO_RESERVE_MEM = 0x49
SO_REUSEADDR = 0x2 SO_REUSEADDR = 0x2
SO_REUSEPORT = 0xf SO_REUSEPORT = 0xf
SO_RXQ_OVFL = 0x28 SO_RXQ_OVFL = 0x28

View File

@ -5,7 +5,7 @@
// +build mips,linux // +build mips,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
package unix package unix
@ -250,6 +250,8 @@ const (
RTC_EPOCH_SET = 0x8004700e RTC_EPOCH_SET = 0x8004700e
RTC_IRQP_READ = 0x4004700b RTC_IRQP_READ = 0x4004700b
RTC_IRQP_SET = 0x8004700c RTC_IRQP_SET = 0x8004700c
RTC_PARAM_GET = 0x80187013
RTC_PARAM_SET = 0x80187014
RTC_PIE_OFF = 0x20007006 RTC_PIE_OFF = 0x20007006
RTC_PIE_ON = 0x20007005 RTC_PIE_ON = 0x20007005
RTC_PLL_GET = 0x401c7011 RTC_PLL_GET = 0x401c7011
@ -293,6 +295,7 @@ const (
SO_BPF_EXTENSIONS = 0x30 SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x20 SO_BROADCAST = 0x20
SO_BSDCOMPAT = 0xe SO_BSDCOMPAT = 0xe
SO_BUF_LOCK = 0x48
SO_BUSY_POLL = 0x2e SO_BUSY_POLL = 0x2e
SO_BUSY_POLL_BUDGET = 0x46 SO_BUSY_POLL_BUDGET = 0x46
SO_CNX_ADVICE = 0x35 SO_CNX_ADVICE = 0x35
@ -309,6 +312,7 @@ const (
SO_MARK = 0x24 SO_MARK = 0x24
SO_MAX_PACING_RATE = 0x2f SO_MAX_PACING_RATE = 0x2f
SO_MEMINFO = 0x37 SO_MEMINFO = 0x37
SO_NETNS_COOKIE = 0x47
SO_NOFCS = 0x2b SO_NOFCS = 0x2b
SO_OOBINLINE = 0x100 SO_OOBINLINE = 0x100
SO_PASSCRED = 0x11 SO_PASSCRED = 0x11
@ -325,6 +329,7 @@ const (
SO_RCVTIMEO = 0x1006 SO_RCVTIMEO = 0x1006
SO_RCVTIMEO_NEW = 0x42 SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x1006 SO_RCVTIMEO_OLD = 0x1006
SO_RESERVE_MEM = 0x49
SO_REUSEADDR = 0x4 SO_REUSEADDR = 0x4
SO_REUSEPORT = 0x200 SO_REUSEPORT = 0x200
SO_RXQ_OVFL = 0x28 SO_RXQ_OVFL = 0x28

View File

@ -5,7 +5,7 @@
// +build mips64,linux // +build mips64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
package unix package unix
@ -250,6 +250,8 @@ const (
RTC_EPOCH_SET = 0x8008700e RTC_EPOCH_SET = 0x8008700e
RTC_IRQP_READ = 0x4008700b RTC_IRQP_READ = 0x4008700b
RTC_IRQP_SET = 0x8008700c RTC_IRQP_SET = 0x8008700c
RTC_PARAM_GET = 0x80187013
RTC_PARAM_SET = 0x80187014
RTC_PIE_OFF = 0x20007006 RTC_PIE_OFF = 0x20007006
RTC_PIE_ON = 0x20007005 RTC_PIE_ON = 0x20007005
RTC_PLL_GET = 0x40207011 RTC_PLL_GET = 0x40207011
@ -293,6 +295,7 @@ const (
SO_BPF_EXTENSIONS = 0x30 SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x20 SO_BROADCAST = 0x20
SO_BSDCOMPAT = 0xe SO_BSDCOMPAT = 0xe
SO_BUF_LOCK = 0x48
SO_BUSY_POLL = 0x2e SO_BUSY_POLL = 0x2e
SO_BUSY_POLL_BUDGET = 0x46 SO_BUSY_POLL_BUDGET = 0x46
SO_CNX_ADVICE = 0x35 SO_CNX_ADVICE = 0x35
@ -309,6 +312,7 @@ const (
SO_MARK = 0x24 SO_MARK = 0x24
SO_MAX_PACING_RATE = 0x2f SO_MAX_PACING_RATE = 0x2f
SO_MEMINFO = 0x37 SO_MEMINFO = 0x37
SO_NETNS_COOKIE = 0x47
SO_NOFCS = 0x2b SO_NOFCS = 0x2b
SO_OOBINLINE = 0x100 SO_OOBINLINE = 0x100
SO_PASSCRED = 0x11 SO_PASSCRED = 0x11
@ -325,6 +329,7 @@ const (
SO_RCVTIMEO = 0x1006 SO_RCVTIMEO = 0x1006
SO_RCVTIMEO_NEW = 0x42 SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x1006 SO_RCVTIMEO_OLD = 0x1006
SO_RESERVE_MEM = 0x49
SO_REUSEADDR = 0x4 SO_REUSEADDR = 0x4
SO_REUSEPORT = 0x200 SO_REUSEPORT = 0x200
SO_RXQ_OVFL = 0x28 SO_RXQ_OVFL = 0x28

View File

@ -5,7 +5,7 @@
// +build mips64le,linux // +build mips64le,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
package unix package unix
@ -250,6 +250,8 @@ const (
RTC_EPOCH_SET = 0x8008700e RTC_EPOCH_SET = 0x8008700e
RTC_IRQP_READ = 0x4008700b RTC_IRQP_READ = 0x4008700b
RTC_IRQP_SET = 0x8008700c RTC_IRQP_SET = 0x8008700c
RTC_PARAM_GET = 0x80187013
RTC_PARAM_SET = 0x80187014
RTC_PIE_OFF = 0x20007006 RTC_PIE_OFF = 0x20007006
RTC_PIE_ON = 0x20007005 RTC_PIE_ON = 0x20007005
RTC_PLL_GET = 0x40207011 RTC_PLL_GET = 0x40207011
@ -293,6 +295,7 @@ const (
SO_BPF_EXTENSIONS = 0x30 SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x20 SO_BROADCAST = 0x20
SO_BSDCOMPAT = 0xe SO_BSDCOMPAT = 0xe
SO_BUF_LOCK = 0x48
SO_BUSY_POLL = 0x2e SO_BUSY_POLL = 0x2e
SO_BUSY_POLL_BUDGET = 0x46 SO_BUSY_POLL_BUDGET = 0x46
SO_CNX_ADVICE = 0x35 SO_CNX_ADVICE = 0x35
@ -309,6 +312,7 @@ const (
SO_MARK = 0x24 SO_MARK = 0x24
SO_MAX_PACING_RATE = 0x2f SO_MAX_PACING_RATE = 0x2f
SO_MEMINFO = 0x37 SO_MEMINFO = 0x37
SO_NETNS_COOKIE = 0x47
SO_NOFCS = 0x2b SO_NOFCS = 0x2b
SO_OOBINLINE = 0x100 SO_OOBINLINE = 0x100
SO_PASSCRED = 0x11 SO_PASSCRED = 0x11
@ -325,6 +329,7 @@ const (
SO_RCVTIMEO = 0x1006 SO_RCVTIMEO = 0x1006
SO_RCVTIMEO_NEW = 0x42 SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x1006 SO_RCVTIMEO_OLD = 0x1006
SO_RESERVE_MEM = 0x49
SO_REUSEADDR = 0x4 SO_REUSEADDR = 0x4
SO_REUSEPORT = 0x200 SO_REUSEPORT = 0x200
SO_RXQ_OVFL = 0x28 SO_RXQ_OVFL = 0x28

View File

@ -5,7 +5,7 @@
// +build mipsle,linux // +build mipsle,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
package unix package unix
@ -250,6 +250,8 @@ const (
RTC_EPOCH_SET = 0x8004700e RTC_EPOCH_SET = 0x8004700e
RTC_IRQP_READ = 0x4004700b RTC_IRQP_READ = 0x4004700b
RTC_IRQP_SET = 0x8004700c RTC_IRQP_SET = 0x8004700c
RTC_PARAM_GET = 0x80187013
RTC_PARAM_SET = 0x80187014
RTC_PIE_OFF = 0x20007006 RTC_PIE_OFF = 0x20007006
RTC_PIE_ON = 0x20007005 RTC_PIE_ON = 0x20007005
RTC_PLL_GET = 0x401c7011 RTC_PLL_GET = 0x401c7011
@ -293,6 +295,7 @@ const (
SO_BPF_EXTENSIONS = 0x30 SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x20 SO_BROADCAST = 0x20
SO_BSDCOMPAT = 0xe SO_BSDCOMPAT = 0xe
SO_BUF_LOCK = 0x48
SO_BUSY_POLL = 0x2e SO_BUSY_POLL = 0x2e
SO_BUSY_POLL_BUDGET = 0x46 SO_BUSY_POLL_BUDGET = 0x46
SO_CNX_ADVICE = 0x35 SO_CNX_ADVICE = 0x35
@ -309,6 +312,7 @@ const (
SO_MARK = 0x24 SO_MARK = 0x24
SO_MAX_PACING_RATE = 0x2f SO_MAX_PACING_RATE = 0x2f
SO_MEMINFO = 0x37 SO_MEMINFO = 0x37
SO_NETNS_COOKIE = 0x47
SO_NOFCS = 0x2b SO_NOFCS = 0x2b
SO_OOBINLINE = 0x100 SO_OOBINLINE = 0x100
SO_PASSCRED = 0x11 SO_PASSCRED = 0x11
@ -325,6 +329,7 @@ const (
SO_RCVTIMEO = 0x1006 SO_RCVTIMEO = 0x1006
SO_RCVTIMEO_NEW = 0x42 SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x1006 SO_RCVTIMEO_OLD = 0x1006
SO_RESERVE_MEM = 0x49
SO_REUSEADDR = 0x4 SO_REUSEADDR = 0x4
SO_REUSEPORT = 0x200 SO_REUSEPORT = 0x200
SO_RXQ_OVFL = 0x28 SO_RXQ_OVFL = 0x28

View File

@ -5,7 +5,7 @@
// +build ppc,linux // +build ppc,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
package unix package unix
@ -305,6 +305,8 @@ const (
RTC_EPOCH_SET = 0x8004700e RTC_EPOCH_SET = 0x8004700e
RTC_IRQP_READ = 0x4004700b RTC_IRQP_READ = 0x4004700b
RTC_IRQP_SET = 0x8004700c RTC_IRQP_SET = 0x8004700c
RTC_PARAM_GET = 0x80187013
RTC_PARAM_SET = 0x80187014
RTC_PIE_OFF = 0x20007006 RTC_PIE_OFF = 0x20007006
RTC_PIE_ON = 0x20007005 RTC_PIE_ON = 0x20007005
RTC_PLL_GET = 0x401c7011 RTC_PLL_GET = 0x401c7011
@ -348,6 +350,7 @@ const (
SO_BPF_EXTENSIONS = 0x30 SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x6 SO_BROADCAST = 0x6
SO_BSDCOMPAT = 0xe SO_BSDCOMPAT = 0xe
SO_BUF_LOCK = 0x48
SO_BUSY_POLL = 0x2e SO_BUSY_POLL = 0x2e
SO_BUSY_POLL_BUDGET = 0x46 SO_BUSY_POLL_BUDGET = 0x46
SO_CNX_ADVICE = 0x35 SO_CNX_ADVICE = 0x35
@ -364,6 +367,7 @@ const (
SO_MARK = 0x24 SO_MARK = 0x24
SO_MAX_PACING_RATE = 0x2f SO_MAX_PACING_RATE = 0x2f
SO_MEMINFO = 0x37 SO_MEMINFO = 0x37
SO_NETNS_COOKIE = 0x47
SO_NOFCS = 0x2b SO_NOFCS = 0x2b
SO_OOBINLINE = 0xa SO_OOBINLINE = 0xa
SO_PASSCRED = 0x14 SO_PASSCRED = 0x14
@ -380,6 +384,7 @@ const (
SO_RCVTIMEO = 0x12 SO_RCVTIMEO = 0x12
SO_RCVTIMEO_NEW = 0x42 SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x12 SO_RCVTIMEO_OLD = 0x12
SO_RESERVE_MEM = 0x49
SO_REUSEADDR = 0x2 SO_REUSEADDR = 0x2
SO_REUSEPORT = 0xf SO_REUSEPORT = 0xf
SO_RXQ_OVFL = 0x28 SO_RXQ_OVFL = 0x28

View File

@ -5,7 +5,7 @@
// +build ppc64,linux // +build ppc64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
package unix package unix
@ -309,6 +309,8 @@ const (
RTC_EPOCH_SET = 0x8008700e RTC_EPOCH_SET = 0x8008700e
RTC_IRQP_READ = 0x4008700b RTC_IRQP_READ = 0x4008700b
RTC_IRQP_SET = 0x8008700c RTC_IRQP_SET = 0x8008700c
RTC_PARAM_GET = 0x80187013
RTC_PARAM_SET = 0x80187014
RTC_PIE_OFF = 0x20007006 RTC_PIE_OFF = 0x20007006
RTC_PIE_ON = 0x20007005 RTC_PIE_ON = 0x20007005
RTC_PLL_GET = 0x40207011 RTC_PLL_GET = 0x40207011
@ -352,6 +354,7 @@ const (
SO_BPF_EXTENSIONS = 0x30 SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x6 SO_BROADCAST = 0x6
SO_BSDCOMPAT = 0xe SO_BSDCOMPAT = 0xe
SO_BUF_LOCK = 0x48
SO_BUSY_POLL = 0x2e SO_BUSY_POLL = 0x2e
SO_BUSY_POLL_BUDGET = 0x46 SO_BUSY_POLL_BUDGET = 0x46
SO_CNX_ADVICE = 0x35 SO_CNX_ADVICE = 0x35
@ -368,6 +371,7 @@ const (
SO_MARK = 0x24 SO_MARK = 0x24
SO_MAX_PACING_RATE = 0x2f SO_MAX_PACING_RATE = 0x2f
SO_MEMINFO = 0x37 SO_MEMINFO = 0x37
SO_NETNS_COOKIE = 0x47
SO_NOFCS = 0x2b SO_NOFCS = 0x2b
SO_OOBINLINE = 0xa SO_OOBINLINE = 0xa
SO_PASSCRED = 0x14 SO_PASSCRED = 0x14
@ -384,6 +388,7 @@ const (
SO_RCVTIMEO = 0x12 SO_RCVTIMEO = 0x12
SO_RCVTIMEO_NEW = 0x42 SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x12 SO_RCVTIMEO_OLD = 0x12
SO_RESERVE_MEM = 0x49
SO_REUSEADDR = 0x2 SO_REUSEADDR = 0x2
SO_REUSEPORT = 0xf SO_REUSEPORT = 0xf
SO_RXQ_OVFL = 0x28 SO_RXQ_OVFL = 0x28

View File

@ -5,7 +5,7 @@
// +build ppc64le,linux // +build ppc64le,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
package unix package unix
@ -309,6 +309,8 @@ const (
RTC_EPOCH_SET = 0x8008700e RTC_EPOCH_SET = 0x8008700e
RTC_IRQP_READ = 0x4008700b RTC_IRQP_READ = 0x4008700b
RTC_IRQP_SET = 0x8008700c RTC_IRQP_SET = 0x8008700c
RTC_PARAM_GET = 0x80187013
RTC_PARAM_SET = 0x80187014
RTC_PIE_OFF = 0x20007006 RTC_PIE_OFF = 0x20007006
RTC_PIE_ON = 0x20007005 RTC_PIE_ON = 0x20007005
RTC_PLL_GET = 0x40207011 RTC_PLL_GET = 0x40207011
@ -352,6 +354,7 @@ const (
SO_BPF_EXTENSIONS = 0x30 SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x6 SO_BROADCAST = 0x6
SO_BSDCOMPAT = 0xe SO_BSDCOMPAT = 0xe
SO_BUF_LOCK = 0x48
SO_BUSY_POLL = 0x2e SO_BUSY_POLL = 0x2e
SO_BUSY_POLL_BUDGET = 0x46 SO_BUSY_POLL_BUDGET = 0x46
SO_CNX_ADVICE = 0x35 SO_CNX_ADVICE = 0x35
@ -368,6 +371,7 @@ const (
SO_MARK = 0x24 SO_MARK = 0x24
SO_MAX_PACING_RATE = 0x2f SO_MAX_PACING_RATE = 0x2f
SO_MEMINFO = 0x37 SO_MEMINFO = 0x37
SO_NETNS_COOKIE = 0x47
SO_NOFCS = 0x2b SO_NOFCS = 0x2b
SO_OOBINLINE = 0xa SO_OOBINLINE = 0xa
SO_PASSCRED = 0x14 SO_PASSCRED = 0x14
@ -384,6 +388,7 @@ const (
SO_RCVTIMEO = 0x12 SO_RCVTIMEO = 0x12
SO_RCVTIMEO_NEW = 0x42 SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x12 SO_RCVTIMEO_OLD = 0x12
SO_RESERVE_MEM = 0x49
SO_REUSEADDR = 0x2 SO_REUSEADDR = 0x2
SO_REUSEPORT = 0xf SO_REUSEPORT = 0xf
SO_RXQ_OVFL = 0x28 SO_RXQ_OVFL = 0x28

View File

@ -5,7 +5,7 @@
// +build riscv64,linux // +build riscv64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
package unix package unix
@ -238,6 +238,8 @@ const (
RTC_EPOCH_SET = 0x4008700e RTC_EPOCH_SET = 0x4008700e
RTC_IRQP_READ = 0x8008700b RTC_IRQP_READ = 0x8008700b
RTC_IRQP_SET = 0x4008700c RTC_IRQP_SET = 0x4008700c
RTC_PARAM_GET = 0x40187013
RTC_PARAM_SET = 0x40187014
RTC_PIE_OFF = 0x7006 RTC_PIE_OFF = 0x7006
RTC_PIE_ON = 0x7005 RTC_PIE_ON = 0x7005
RTC_PLL_GET = 0x80207011 RTC_PLL_GET = 0x80207011
@ -281,6 +283,7 @@ const (
SO_BPF_EXTENSIONS = 0x30 SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x6 SO_BROADCAST = 0x6
SO_BSDCOMPAT = 0xe SO_BSDCOMPAT = 0xe
SO_BUF_LOCK = 0x48
SO_BUSY_POLL = 0x2e SO_BUSY_POLL = 0x2e
SO_BUSY_POLL_BUDGET = 0x46 SO_BUSY_POLL_BUDGET = 0x46
SO_CNX_ADVICE = 0x35 SO_CNX_ADVICE = 0x35
@ -297,6 +300,7 @@ const (
SO_MARK = 0x24 SO_MARK = 0x24
SO_MAX_PACING_RATE = 0x2f SO_MAX_PACING_RATE = 0x2f
SO_MEMINFO = 0x37 SO_MEMINFO = 0x37
SO_NETNS_COOKIE = 0x47
SO_NOFCS = 0x2b SO_NOFCS = 0x2b
SO_OOBINLINE = 0xa SO_OOBINLINE = 0xa
SO_PASSCRED = 0x10 SO_PASSCRED = 0x10
@ -313,6 +317,7 @@ const (
SO_RCVTIMEO = 0x14 SO_RCVTIMEO = 0x14
SO_RCVTIMEO_NEW = 0x42 SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x14 SO_RCVTIMEO_OLD = 0x14
SO_RESERVE_MEM = 0x49
SO_REUSEADDR = 0x2 SO_REUSEADDR = 0x2
SO_REUSEPORT = 0xf SO_REUSEPORT = 0xf
SO_RXQ_OVFL = 0x28 SO_RXQ_OVFL = 0x28

View File

@ -5,7 +5,7 @@
// +build s390x,linux // +build s390x,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/_const.go // cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/unix/_const.go
package unix package unix
@ -313,6 +313,8 @@ const (
RTC_EPOCH_SET = 0x4008700e RTC_EPOCH_SET = 0x4008700e
RTC_IRQP_READ = 0x8008700b RTC_IRQP_READ = 0x8008700b
RTC_IRQP_SET = 0x4008700c RTC_IRQP_SET = 0x4008700c
RTC_PARAM_GET = 0x40187013
RTC_PARAM_SET = 0x40187014
RTC_PIE_OFF = 0x7006 RTC_PIE_OFF = 0x7006
RTC_PIE_ON = 0x7005 RTC_PIE_ON = 0x7005
RTC_PLL_GET = 0x80207011 RTC_PLL_GET = 0x80207011
@ -356,6 +358,7 @@ const (
SO_BPF_EXTENSIONS = 0x30 SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x6 SO_BROADCAST = 0x6
SO_BSDCOMPAT = 0xe SO_BSDCOMPAT = 0xe
SO_BUF_LOCK = 0x48
SO_BUSY_POLL = 0x2e SO_BUSY_POLL = 0x2e
SO_BUSY_POLL_BUDGET = 0x46 SO_BUSY_POLL_BUDGET = 0x46
SO_CNX_ADVICE = 0x35 SO_CNX_ADVICE = 0x35
@ -372,6 +375,7 @@ const (
SO_MARK = 0x24 SO_MARK = 0x24
SO_MAX_PACING_RATE = 0x2f SO_MAX_PACING_RATE = 0x2f
SO_MEMINFO = 0x37 SO_MEMINFO = 0x37
SO_NETNS_COOKIE = 0x47
SO_NOFCS = 0x2b SO_NOFCS = 0x2b
SO_OOBINLINE = 0xa SO_OOBINLINE = 0xa
SO_PASSCRED = 0x10 SO_PASSCRED = 0x10
@ -388,6 +392,7 @@ const (
SO_RCVTIMEO = 0x14 SO_RCVTIMEO = 0x14
SO_RCVTIMEO_NEW = 0x42 SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x14 SO_RCVTIMEO_OLD = 0x14
SO_RESERVE_MEM = 0x49
SO_REUSEADDR = 0x2 SO_REUSEADDR = 0x2
SO_REUSEPORT = 0xf SO_REUSEPORT = 0xf
SO_RXQ_OVFL = 0x28 SO_RXQ_OVFL = 0x28

View File

@ -5,7 +5,7 @@
// +build sparc64,linux // +build sparc64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
package unix package unix
@ -304,6 +304,8 @@ const (
RTC_EPOCH_SET = 0x8008700e RTC_EPOCH_SET = 0x8008700e
RTC_IRQP_READ = 0x4008700b RTC_IRQP_READ = 0x4008700b
RTC_IRQP_SET = 0x8008700c RTC_IRQP_SET = 0x8008700c
RTC_PARAM_GET = 0x80187013
RTC_PARAM_SET = 0x80187014
RTC_PIE_OFF = 0x20007006 RTC_PIE_OFF = 0x20007006
RTC_PIE_ON = 0x20007005 RTC_PIE_ON = 0x20007005
RTC_PLL_GET = 0x40207011 RTC_PLL_GET = 0x40207011
@ -347,6 +349,7 @@ const (
SO_BPF_EXTENSIONS = 0x32 SO_BPF_EXTENSIONS = 0x32
SO_BROADCAST = 0x20 SO_BROADCAST = 0x20
SO_BSDCOMPAT = 0x400 SO_BSDCOMPAT = 0x400
SO_BUF_LOCK = 0x51
SO_BUSY_POLL = 0x30 SO_BUSY_POLL = 0x30
SO_BUSY_POLL_BUDGET = 0x49 SO_BUSY_POLL_BUDGET = 0x49
SO_CNX_ADVICE = 0x37 SO_CNX_ADVICE = 0x37
@ -363,6 +366,7 @@ const (
SO_MARK = 0x22 SO_MARK = 0x22
SO_MAX_PACING_RATE = 0x31 SO_MAX_PACING_RATE = 0x31
SO_MEMINFO = 0x39 SO_MEMINFO = 0x39
SO_NETNS_COOKIE = 0x50
SO_NOFCS = 0x27 SO_NOFCS = 0x27
SO_OOBINLINE = 0x100 SO_OOBINLINE = 0x100
SO_PASSCRED = 0x2 SO_PASSCRED = 0x2
@ -379,6 +383,7 @@ const (
SO_RCVTIMEO = 0x2000 SO_RCVTIMEO = 0x2000
SO_RCVTIMEO_NEW = 0x44 SO_RCVTIMEO_NEW = 0x44
SO_RCVTIMEO_OLD = 0x2000 SO_RCVTIMEO_OLD = 0x2000
SO_RESERVE_MEM = 0x52
SO_REUSEADDR = 0x4 SO_REUSEADDR = 0x4
SO_REUSEPORT = 0x200 SO_REUSEPORT = 0x200
SO_RXQ_OVFL = 0x24 SO_RXQ_OVFL = 0x24

View File

@ -17,6 +17,7 @@ int getdirent(int, uintptr_t, size_t);
int wait4(int, uintptr_t, int, uintptr_t); int wait4(int, uintptr_t, int, uintptr_t);
int ioctl(int, int, uintptr_t); int ioctl(int, int, uintptr_t);
int fcntl(uintptr_t, int, uintptr_t); int fcntl(uintptr_t, int, uintptr_t);
int fsync_range(int, int, long long, long long);
int acct(uintptr_t); int acct(uintptr_t);
int chdir(uintptr_t); int chdir(uintptr_t);
int chroot(uintptr_t); int chroot(uintptr_t);
@ -29,7 +30,6 @@ int fchmod(int, unsigned int);
int fchmodat(int, uintptr_t, unsigned int, int); int fchmodat(int, uintptr_t, unsigned int, int);
int fchownat(int, uintptr_t, int, int, int); int fchownat(int, uintptr_t, int, int, int);
int fdatasync(int); int fdatasync(int);
int fsync(int);
int getpgid(int); int getpgid(int);
int getpgrp(); int getpgrp();
int getpid(); int getpid();
@ -255,6 +255,16 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fsyncRange(fd int, how int, start int64, length int64) (err error) {
r0, er := C.fsync_range(C.int(fd), C.int(how), C.longlong(start), C.longlong(length))
if r0 == -1 && er != nil {
err = er
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Acct(path string) (err error) { func Acct(path string) (err error) {
_p0 := uintptr(unsafe.Pointer(C.CString(path))) _p0 := uintptr(unsafe.Pointer(C.CString(path)))
r0, er := C.acct(C.uintptr_t(_p0)) r0, er := C.acct(C.uintptr_t(_p0))
@ -379,16 +389,6 @@ func Fdatasync(fd int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fsync(fd int) (err error) {
r0, er := C.fsync(C.int(fd))
if r0 == -1 && er != nil {
err = er
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpgid(pid int) (pgid int, err error) { func Getpgid(pid int) (pgid int, err error) {
r0, er := C.getpgid(C.int(pid)) r0, er := C.getpgid(C.int(pid))
pgid = int(r0) pgid = int(r0)
@ -975,7 +975,7 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pread(fd int, p []byte, offset int64) (n int, err error) { func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 *byte var _p0 *byte
if len(p) > 0 { if len(p) > 0 {
_p0 = &p[0] _p0 = &p[0]
@ -992,7 +992,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pwrite(fd int, p []byte, offset int64) (n int, err error) { func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 *byte var _p0 *byte
if len(p) > 0 { if len(p) > 0 {
_p0 = &p[0] _p0 = &p[0]

View File

@ -135,6 +135,16 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fsyncRange(fd int, how int, start int64, length int64) (err error) {
_, e1 := callfsync_range(fd, how, start, length)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Acct(path string) (err error) { func Acct(path string) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -283,16 +293,6 @@ func Fdatasync(fd int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fsync(fd int) (err error) {
_, e1 := callfsync(fd)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpgid(pid int) (pgid int, err error) { func Getpgid(pid int) (pgid int, err error) {
r0, e1 := callgetpgid(pid) r0, e1 := callgetpgid(pid)
pgid = int(r0) pgid = int(r0)
@ -931,7 +931,7 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pread(fd int, p []byte, offset int64) (n int, err error) { func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 *byte var _p0 *byte
if len(p) > 0 { if len(p) > 0 {
_p0 = &p[0] _p0 = &p[0]
@ -946,7 +946,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pwrite(fd int, p []byte, offset int64) (n int, err error) { func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 *byte var _p0 *byte
if len(p) > 0 { if len(p) > 0 {
_p0 = &p[0] _p0 = &p[0]

View File

@ -18,6 +18,7 @@ import (
//go:cgo_import_dynamic libc_wait4 wait4 "libc.a/shr_64.o" //go:cgo_import_dynamic libc_wait4 wait4 "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_ioctl ioctl "libc.a/shr_64.o" //go:cgo_import_dynamic libc_ioctl ioctl "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_fcntl fcntl "libc.a/shr_64.o" //go:cgo_import_dynamic libc_fcntl fcntl "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_fsync_range fsync_range "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_acct acct "libc.a/shr_64.o" //go:cgo_import_dynamic libc_acct acct "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_chdir chdir "libc.a/shr_64.o" //go:cgo_import_dynamic libc_chdir chdir "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_chroot chroot "libc.a/shr_64.o" //go:cgo_import_dynamic libc_chroot chroot "libc.a/shr_64.o"
@ -30,7 +31,6 @@ import (
//go:cgo_import_dynamic libc_fchmodat fchmodat "libc.a/shr_64.o" //go:cgo_import_dynamic libc_fchmodat fchmodat "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_fchownat fchownat "libc.a/shr_64.o" //go:cgo_import_dynamic libc_fchownat fchownat "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_fdatasync fdatasync "libc.a/shr_64.o" //go:cgo_import_dynamic libc_fdatasync fdatasync "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_fsync fsync "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_getpgid getpgid "libc.a/shr_64.o" //go:cgo_import_dynamic libc_getpgid getpgid "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_getpgrp getpgrp "libc.a/shr_64.o" //go:cgo_import_dynamic libc_getpgrp getpgrp "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_getpid getpid "libc.a/shr_64.o" //go:cgo_import_dynamic libc_getpid getpid "libc.a/shr_64.o"
@ -136,6 +136,7 @@ import (
//go:linkname libc_wait4 libc_wait4 //go:linkname libc_wait4 libc_wait4
//go:linkname libc_ioctl libc_ioctl //go:linkname libc_ioctl libc_ioctl
//go:linkname libc_fcntl libc_fcntl //go:linkname libc_fcntl libc_fcntl
//go:linkname libc_fsync_range libc_fsync_range
//go:linkname libc_acct libc_acct //go:linkname libc_acct libc_acct
//go:linkname libc_chdir libc_chdir //go:linkname libc_chdir libc_chdir
//go:linkname libc_chroot libc_chroot //go:linkname libc_chroot libc_chroot
@ -148,7 +149,6 @@ import (
//go:linkname libc_fchmodat libc_fchmodat //go:linkname libc_fchmodat libc_fchmodat
//go:linkname libc_fchownat libc_fchownat //go:linkname libc_fchownat libc_fchownat
//go:linkname libc_fdatasync libc_fdatasync //go:linkname libc_fdatasync libc_fdatasync
//go:linkname libc_fsync libc_fsync
//go:linkname libc_getpgid libc_getpgid //go:linkname libc_getpgid libc_getpgid
//go:linkname libc_getpgrp libc_getpgrp //go:linkname libc_getpgrp libc_getpgrp
//go:linkname libc_getpid libc_getpid //go:linkname libc_getpid libc_getpid
@ -257,6 +257,7 @@ var (
libc_wait4, libc_wait4,
libc_ioctl, libc_ioctl,
libc_fcntl, libc_fcntl,
libc_fsync_range,
libc_acct, libc_acct,
libc_chdir, libc_chdir,
libc_chroot, libc_chroot,
@ -269,7 +270,6 @@ var (
libc_fchmodat, libc_fchmodat,
libc_fchownat, libc_fchownat,
libc_fdatasync, libc_fdatasync,
libc_fsync,
libc_getpgid, libc_getpgid,
libc_getpgrp, libc_getpgrp,
libc_getpid, libc_getpid,
@ -430,6 +430,13 @@ func callfcntl(fd uintptr, cmd int, arg uintptr) (r1 uintptr, e1 Errno) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func callfsync_range(fd int, how int, start int64, length int64) (r1 uintptr, e1 Errno) {
r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fsync_range)), 4, uintptr(fd), uintptr(how), uintptr(start), uintptr(length), 0, 0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func callacct(_p0 uintptr) (r1 uintptr, e1 Errno) { func callacct(_p0 uintptr) (r1 uintptr, e1 Errno) {
r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_acct)), 1, _p0, 0, 0, 0, 0, 0) r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_acct)), 1, _p0, 0, 0, 0, 0, 0)
return return
@ -514,13 +521,6 @@ func callfdatasync(fd int) (r1 uintptr, e1 Errno) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func callfsync(fd int) (r1 uintptr, e1 Errno) {
r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fsync)), 1, uintptr(fd), 0, 0, 0, 0, 0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func callgetpgid(pid int) (r1 uintptr, e1 Errno) { func callgetpgid(pid int) (r1 uintptr, e1 Errno) {
r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getpgid)), 1, uintptr(pid), 0, 0, 0, 0, 0) r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getpgid)), 1, uintptr(pid), 0, 0, 0, 0, 0)
return return

View File

@ -16,6 +16,7 @@ int getdirent(int, uintptr_t, size_t);
int wait4(int, uintptr_t, int, uintptr_t); int wait4(int, uintptr_t, int, uintptr_t);
int ioctl(int, int, uintptr_t); int ioctl(int, int, uintptr_t);
int fcntl(uintptr_t, int, uintptr_t); int fcntl(uintptr_t, int, uintptr_t);
int fsync_range(int, int, long long, long long);
int acct(uintptr_t); int acct(uintptr_t);
int chdir(uintptr_t); int chdir(uintptr_t);
int chroot(uintptr_t); int chroot(uintptr_t);
@ -28,7 +29,6 @@ int fchmod(int, unsigned int);
int fchmodat(int, uintptr_t, unsigned int, int); int fchmodat(int, uintptr_t, unsigned int, int);
int fchownat(int, uintptr_t, int, int, int); int fchownat(int, uintptr_t, int, int, int);
int fdatasync(int); int fdatasync(int);
int fsync(int);
int getpgid(int); int getpgid(int);
int getpgrp(); int getpgrp();
int getpid(); int getpid();
@ -199,6 +199,14 @@ func callfcntl(fd uintptr, cmd int, arg uintptr) (r1 uintptr, e1 Errno) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func callfsync_range(fd int, how int, start int64, length int64) (r1 uintptr, e1 Errno) {
r1 = uintptr(C.fsync_range(C.int(fd), C.int(how), C.longlong(start), C.longlong(length)))
e1 = syscall.GetErrno()
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func callacct(_p0 uintptr) (r1 uintptr, e1 Errno) { func callacct(_p0 uintptr) (r1 uintptr, e1 Errno) {
r1 = uintptr(C.acct(C.uintptr_t(_p0))) r1 = uintptr(C.acct(C.uintptr_t(_p0)))
e1 = syscall.GetErrno() e1 = syscall.GetErrno()
@ -295,14 +303,6 @@ func callfdatasync(fd int) (r1 uintptr, e1 Errno) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func callfsync(fd int) (r1 uintptr, e1 Errno) {
r1 = uintptr(C.fsync(C.int(fd)))
e1 = syscall.GetErrno()
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func callgetpgid(pid int) (r1 uintptr, e1 Errno) { func callgetpgid(pid int) (r1 uintptr, e1 Errno) {
r1 = uintptr(C.getpgid(C.int(pid))) r1 = uintptr(C.getpgid(C.int(pid)))
e1 = syscall.GetErrno() e1 = syscall.GetErrno()

View File

@ -643,17 +643,22 @@ var libc_flistxattr_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) { func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
_, _, e1 := syscall_syscall6(libc_setattrlist_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0) var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
if e1 != 0 { if e1 != 0 {
err = errnoErr(e1) err = errnoErr(e1)
} }
return return
} }
var libc_setattrlist_trampoline_addr uintptr var libc_utimensat_trampoline_addr uintptr
//go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib" //go:cgo_import_dynamic libc_utimensat utimensat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@ -734,6 +739,65 @@ var libc_sendfile_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {
r0, _, e1 := syscall_syscall(libc_shmat_trampoline_addr, uintptr(id), uintptr(addr), uintptr(flag))
ret = uintptr(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
var libc_shmat_trampoline_addr uintptr
//go:cgo_import_dynamic libc_shmat shmat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) {
r0, _, e1 := syscall_syscall(libc_shmctl_trampoline_addr, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf)))
result = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
var libc_shmctl_trampoline_addr uintptr
//go:cgo_import_dynamic libc_shmctl shmctl "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func shmdt(addr uintptr) (err error) {
_, _, e1 := syscall_syscall(libc_shmdt_trampoline_addr, uintptr(addr), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
var libc_shmdt_trampoline_addr uintptr
//go:cgo_import_dynamic libc_shmdt shmdt "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func shmget(key int, size int, flag int) (id int, err error) {
r0, _, e1 := syscall_syscall(libc_shmget_trampoline_addr, uintptr(key), uintptr(size), uintptr(flag))
id = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
var libc_shmget_trampoline_addr uintptr
//go:cgo_import_dynamic libc_shmget shmget "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Access(path string, mode uint32) (err error) { func Access(path string, mode uint32) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -1639,7 +1703,7 @@ var libc_pathconf_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pread(fd int, p []byte, offset int64) (n int, err error) { func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -1660,7 +1724,7 @@ var libc_pread_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pwrite(fd int, p []byte, offset int64) (n int, err error) { func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])

View File

@ -228,11 +228,11 @@ TEXT libc_flistxattr_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_flistxattr_trampoline_addr(SB), RODATA, $8 GLOBL ·libc_flistxattr_trampoline_addr(SB), RODATA, $8
DATA ·libc_flistxattr_trampoline_addr(SB)/8, $libc_flistxattr_trampoline<>(SB) DATA ·libc_flistxattr_trampoline_addr(SB)/8, $libc_flistxattr_trampoline<>(SB)
TEXT libc_setattrlist_trampoline<>(SB),NOSPLIT,$0-0 TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setattrlist(SB) JMP libc_utimensat(SB)
GLOBL ·libc_setattrlist_trampoline_addr(SB), RODATA, $8 GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8
DATA ·libc_setattrlist_trampoline_addr(SB)/8, $libc_setattrlist_trampoline<>(SB) DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)
TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0 TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fcntl(SB) JMP libc_fcntl(SB)
@ -264,6 +264,30 @@ TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8 GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8
DATA ·libc_sendfile_trampoline_addr(SB)/8, $libc_sendfile_trampoline<>(SB) DATA ·libc_sendfile_trampoline_addr(SB)/8, $libc_sendfile_trampoline<>(SB)
TEXT libc_shmat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_shmat(SB)
GLOBL ·libc_shmat_trampoline_addr(SB), RODATA, $8
DATA ·libc_shmat_trampoline_addr(SB)/8, $libc_shmat_trampoline<>(SB)
TEXT libc_shmctl_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_shmctl(SB)
GLOBL ·libc_shmctl_trampoline_addr(SB), RODATA, $8
DATA ·libc_shmctl_trampoline_addr(SB)/8, $libc_shmctl_trampoline<>(SB)
TEXT libc_shmdt_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_shmdt(SB)
GLOBL ·libc_shmdt_trampoline_addr(SB), RODATA, $8
DATA ·libc_shmdt_trampoline_addr(SB)/8, $libc_shmdt_trampoline<>(SB)
TEXT libc_shmget_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_shmget(SB)
GLOBL ·libc_shmget_trampoline_addr(SB), RODATA, $8
DATA ·libc_shmget_trampoline_addr(SB)/8, $libc_shmget_trampoline<>(SB)
TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0 TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_access(SB) JMP libc_access(SB)

View File

@ -643,17 +643,22 @@ var libc_flistxattr_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) { func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
_, _, e1 := syscall_syscall6(libc_setattrlist_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0) var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
if e1 != 0 { if e1 != 0 {
err = errnoErr(e1) err = errnoErr(e1)
} }
return return
} }
var libc_setattrlist_trampoline_addr uintptr var libc_utimensat_trampoline_addr uintptr
//go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib" //go:cgo_import_dynamic libc_utimensat utimensat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@ -734,6 +739,65 @@ var libc_sendfile_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {
r0, _, e1 := syscall_syscall(libc_shmat_trampoline_addr, uintptr(id), uintptr(addr), uintptr(flag))
ret = uintptr(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
var libc_shmat_trampoline_addr uintptr
//go:cgo_import_dynamic libc_shmat shmat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) {
r0, _, e1 := syscall_syscall(libc_shmctl_trampoline_addr, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf)))
result = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
var libc_shmctl_trampoline_addr uintptr
//go:cgo_import_dynamic libc_shmctl shmctl "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func shmdt(addr uintptr) (err error) {
_, _, e1 := syscall_syscall(libc_shmdt_trampoline_addr, uintptr(addr), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
var libc_shmdt_trampoline_addr uintptr
//go:cgo_import_dynamic libc_shmdt shmdt "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func shmget(key int, size int, flag int) (id int, err error) {
r0, _, e1 := syscall_syscall(libc_shmget_trampoline_addr, uintptr(key), uintptr(size), uintptr(flag))
id = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
var libc_shmget_trampoline_addr uintptr
//go:cgo_import_dynamic libc_shmget shmget "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Access(path string, mode uint32) (err error) { func Access(path string, mode uint32) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -1639,7 +1703,7 @@ var libc_pathconf_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pread(fd int, p []byte, offset int64) (n int, err error) { func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -1660,7 +1724,7 @@ var libc_pread_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pwrite(fd int, p []byte, offset int64) (n int, err error) { func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])

View File

@ -228,11 +228,11 @@ TEXT libc_flistxattr_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_flistxattr_trampoline_addr(SB), RODATA, $8 GLOBL ·libc_flistxattr_trampoline_addr(SB), RODATA, $8
DATA ·libc_flistxattr_trampoline_addr(SB)/8, $libc_flistxattr_trampoline<>(SB) DATA ·libc_flistxattr_trampoline_addr(SB)/8, $libc_flistxattr_trampoline<>(SB)
TEXT libc_setattrlist_trampoline<>(SB),NOSPLIT,$0-0 TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setattrlist(SB) JMP libc_utimensat(SB)
GLOBL ·libc_setattrlist_trampoline_addr(SB), RODATA, $8 GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8
DATA ·libc_setattrlist_trampoline_addr(SB)/8, $libc_setattrlist_trampoline<>(SB) DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)
TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0 TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fcntl(SB) JMP libc_fcntl(SB)
@ -264,6 +264,30 @@ TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8 GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8
DATA ·libc_sendfile_trampoline_addr(SB)/8, $libc_sendfile_trampoline<>(SB) DATA ·libc_sendfile_trampoline_addr(SB)/8, $libc_sendfile_trampoline<>(SB)
TEXT libc_shmat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_shmat(SB)
GLOBL ·libc_shmat_trampoline_addr(SB), RODATA, $8
DATA ·libc_shmat_trampoline_addr(SB)/8, $libc_shmat_trampoline<>(SB)
TEXT libc_shmctl_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_shmctl(SB)
GLOBL ·libc_shmctl_trampoline_addr(SB), RODATA, $8
DATA ·libc_shmctl_trampoline_addr(SB)/8, $libc_shmctl_trampoline<>(SB)
TEXT libc_shmdt_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_shmdt(SB)
GLOBL ·libc_shmdt_trampoline_addr(SB), RODATA, $8
DATA ·libc_shmdt_trampoline_addr(SB)/8, $libc_shmdt_trampoline<>(SB)
TEXT libc_shmget_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_shmget(SB)
GLOBL ·libc_shmget_trampoline_addr(SB), RODATA, $8
DATA ·libc_shmget_trampoline_addr(SB)/8, $libc_shmget_trampoline<>(SB)
TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0 TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_access(SB) JMP libc_access(SB)

View File

@ -1420,7 +1420,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pread(fd int, p []byte, offset int64) (n int, err error) { func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -1437,7 +1437,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pwrite(fd int, p []byte, offset int64) (n int, err error) { func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])

View File

@ -1420,7 +1420,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pread(fd int, p []byte, offset int64) (n int, err error) { func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -1437,7 +1437,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pwrite(fd int, p []byte, offset int64) (n int, err error) { func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])

View File

@ -1420,7 +1420,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pread(fd int, p []byte, offset int64) (n int, err error) { func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -1437,7 +1437,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pwrite(fd int, p []byte, offset int64) (n int, err error) { func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])

View File

@ -1420,7 +1420,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pread(fd int, p []byte, offset int64) (n int, err error) { func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -1437,7 +1437,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pwrite(fd int, p []byte, offset int64) (n int, err error) { func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])

View File

@ -1,4 +1,4 @@
// Code generated by mkmerge.go; DO NOT EDIT. // Code generated by mkmerge; DO NOT EDIT.
//go:build linux //go:build linux
// +build linux // +build linux
@ -110,6 +110,16 @@ func openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err e
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe2(p *[2]_C_int, flags int) (err error) {
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
n = int(r0) n = int(r0)
@ -221,6 +231,16 @@ func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Waitid(idType int, id int, info *Siginfo, options int, rusage *Rusage) (err error) {
_, _, e1 := Syscall6(SYS_WAITID, uintptr(idType), uintptr(id), uintptr(unsafe.Pointer(info)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) { func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
ret = int(r0) ret = int(r0)
@ -399,6 +419,21 @@ func mount(source string, target string, fstype string, flags uintptr, data *byt
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func mountSetattr(dirfd int, pathname string, flags uint, attr *MountAttr, size uintptr) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(pathname)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_MOUNT_SETATTR, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(unsafe.Pointer(attr)), uintptr(size), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Acct(path string) (err error) { func Acct(path string) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -793,6 +828,49 @@ func Fsync(fd int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fsmount(fd int, flags int, mountAttrs int) (fsfd int, err error) {
r0, _, e1 := Syscall(SYS_FSMOUNT, uintptr(fd), uintptr(flags), uintptr(mountAttrs))
fsfd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fsopen(fsName string, flags int) (fd int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(fsName)
if err != nil {
return
}
r0, _, e1 := Syscall(SYS_FSOPEN, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fspick(dirfd int, pathName string, flags int) (fd int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(pathName)
if err != nil {
return
}
r0, _, e1 := Syscall(SYS_FSPICK, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getdents(fd int, buf []byte) (n int, err error) { func Getdents(fd int, buf []byte) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(buf) > 0 { if len(buf) > 0 {
@ -1170,6 +1248,26 @@ func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func MoveMount(fromDirfd int, fromPathName string, toDirfd int, toPathName string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(fromPathName)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(toPathName)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_MOVE_MOUNT, uintptr(fromDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(toDirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Nanosleep(time *Timespec, leftover *Timespec) (err error) { func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
if e1 != 0 { if e1 != 0 {
@ -1180,6 +1278,22 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func OpenTree(dfd int, fileName string, flags uint) (r int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(fileName)
if err != nil {
return
}
r0, _, e1 := Syscall(SYS_OPEN_TREE, uintptr(dfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
r = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) { func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0) r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
fd = int(r0) fd = int(r0)
@ -1945,8 +2059,93 @@ func ProcessVMWritev(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags u
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe2(p *[2]_C_int, flags int) (err error) { func PidfdOpen(pid int, flags int) (fd int, err error) {
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) r0, _, e1 := Syscall(SYS_PIDFD_OPEN, uintptr(pid), uintptr(flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func PidfdGetfd(pidfd int, targetfd int, flags int) (fd int, err error) {
r0, _, e1 := Syscall(SYS_PIDFD_GETFD, uintptr(pidfd), uintptr(targetfd), uintptr(flags))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func PidfdSendSignal(pidfd int, sig Signal, info *Siginfo, flags int) (err error) {
_, _, e1 := Syscall6(SYS_PIDFD_SEND_SIGNAL, uintptr(pidfd), uintptr(sig), uintptr(unsafe.Pointer(info)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {
r0, _, e1 := Syscall(SYS_SHMAT, uintptr(id), uintptr(addr), uintptr(flag))
ret = uintptr(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) {
r0, _, e1 := Syscall(SYS_SHMCTL, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf)))
result = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func shmdt(addr uintptr) (err error) {
_, _, e1 := Syscall(SYS_SHMDT, uintptr(addr), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func shmget(key int, size int, flag int) (id int, err error) {
r0, _, e1 := Syscall(SYS_SHMGET, uintptr(key), uintptr(size), uintptr(flag))
id = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getitimer(which int, currValue *Itimerval) (err error) {
_, _, e1 := Syscall(SYS_GETITIMER, uintptr(which), uintptr(unsafe.Pointer(currValue)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setitimer(which int, newValue *Itimerval, oldValue *Itimerval) (err error) {
_, _, e1 := Syscall(SYS_SETITIMER, uintptr(which), uintptr(unsafe.Pointer(newValue)), uintptr(unsafe.Pointer(oldValue)))
if e1 != 0 { if e1 != 0 {
err = errnoErr(e1) err = errnoErr(e1)
} }

View File

@ -1,4 +1,4 @@
// go run mksyscall.go -l32 -tags linux,386 syscall_linux.go syscall_linux_386.go // go run mksyscall.go -l32 -tags linux,386 syscall_linux.go syscall_linux_386.go syscall_linux_alarm.go
// Code generated by the command above; see README.md. DO NOT EDIT. // Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && 386 //go:build linux && 386
@ -46,37 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe(p *[2]_C_int) (err error) {
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func EpollCreate(size int) (fd int, err error) {
r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(events) > 0 { if len(events) > 0 {
@ -181,17 +150,6 @@ func Getuid() (uid int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func InotifyInit() (fd int, err error) {
r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Ioperm(from int, num int, on int) (err error) { func Ioperm(from int, num int, on int) (err error) {
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on)) _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
if e1 != 0 { if e1 != 0 {
@ -242,7 +200,7 @@ func Lstat(path string, stat *Stat_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pread(fd int, p []byte, offset int64) (n int, err error) { func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -259,7 +217,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pwrite(fd int, p []byte, offset int64) (n int, err error) { func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -569,9 +527,9 @@ func utimes(path string, times *[2]Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { func Alarm(seconds uint) (remaining uint, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
n = int(r0) remaining = uint(r0)
if e1 != 0 { if e1 != 0 {
err = errnoErr(e1) err = errnoErr(e1)
} }

View File

@ -1,4 +1,4 @@
// go run mksyscall.go -tags linux,amd64 syscall_linux.go syscall_linux_amd64.go // go run mksyscall.go -tags linux,amd64 syscall_linux.go syscall_linux_amd64.go syscall_linux_alarm.go
// Code generated by the command above; see README.md. DO NOT EDIT. // Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && amd64 //go:build linux && amd64
@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func EpollCreate(size int) (fd int, err error) {
r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(events) > 0 { if len(events) > 0 {
@ -191,17 +170,6 @@ func Getuid() (uid int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func inotifyInit() (fd int, err error) {
r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Ioperm(from int, num int, on int) (err error) { func Ioperm(from int, num int, on int) (err error) {
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on)) _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
if e1 != 0 { if e1 != 0 {
@ -247,6 +215,17 @@ func Listen(s int, n int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func MemfdSecret(flags int) (fd int, err error) {
r0, _, e1 := Syscall(SYS_MEMFD_SECRET, uintptr(flags), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pause() (err error) { func Pause() (err error) {
_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0) _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
if e1 != 0 { if e1 != 0 {
@ -257,7 +236,7 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pread(fd int, p []byte, offset int64) (n int, err error) { func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -274,7 +253,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pwrite(fd int, p []byte, offset int64) (n int, err error) { func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -476,17 +455,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
fd = int(r0) fd = int(r0)
@ -711,27 +679,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe(p *[2]_C_int) (err error) {
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) { func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(cmdline) _p0, err = BytePtrFromString(cmdline)
@ -744,3 +691,14 @@ func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, f
} }
return return
} }
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Alarm(seconds uint) (remaining uint, err error) {
r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
remaining = uint(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}

View File

@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe(p *[2]_C_int) (err error) {
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
fd = int(r0) fd = int(r0)
@ -235,27 +214,6 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func EpollCreate(size int) (fd int, err error) {
r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(events) > 0 { if len(events) > 0 {
@ -340,17 +298,6 @@ func Getuid() (uid int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func InotifyInit() (fd int, err error) {
r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lchown(path string, uid int, gid int) (err error) { func Lchown(path string, uid int, gid int) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -591,7 +538,7 @@ func utimes(path string, times *[2]Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pread(fd int, p []byte, offset int64) (n int, err error) { func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -608,7 +555,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pwrite(fd int, p []byte, offset int64) (n int, err error) { func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -681,17 +628,6 @@ func setrlimit(resource int, rlim *rlimit32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func armSyncFileRange(fd int, flags int, off int64, n int64) (err error) { func armSyncFileRange(fd int, flags int, off int64, n int64) (err error) {
_, _, e1 := Syscall6(SYS_ARM_SYNC_FILE_RANGE, uintptr(fd), uintptr(flags), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32)) _, _, e1 := Syscall6(SYS_ARM_SYNC_FILE_RANGE, uintptr(fd), uintptr(flags), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32))
if e1 != 0 { if e1 != 0 {

View File

@ -180,7 +180,18 @@ func Listen(s int, n int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pread(fd int, p []byte, offset int64) (n int, err error) { func MemfdSecret(flags int) (fd int, err error) {
r0, _, e1 := Syscall(SYS_MEMFD_SECRET, uintptr(flags), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -197,7 +208,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pwrite(fd int, p []byte, offset int64) (n int, err error) { func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -389,17 +400,6 @@ func Truncate(path string, length int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
fd = int(r0) fd = int(r0)

View File

@ -1,4 +1,4 @@
// go run mksyscall.go -b32 -arm -tags linux,mips syscall_linux.go syscall_linux_mipsx.go // go run mksyscall.go -b32 -arm -tags linux,mips syscall_linux.go syscall_linux_mipsx.go syscall_linux_alarm.go
// Code generated by the command above; see README.md. DO NOT EDIT. // Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && mips //go:build linux && mips
@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func EpollCreate(size int) (fd int, err error) {
r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(events) > 0 { if len(events) > 0 {
@ -171,7 +150,7 @@ func Listen(s int, n int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pread(fd int, p []byte, offset int64) (n int, err error) { func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -188,7 +167,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pwrite(fd int, p []byte, offset int64) (n int, err error) { func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -365,17 +344,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
fd = int(r0) fd = int(r0)
@ -544,17 +512,6 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func InotifyInit() (fd int, err error) {
r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Ioperm(from int, num int, on int) (err error) { func Ioperm(from int, num int, on int) (err error) {
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on)) _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
if e1 != 0 { if e1 != 0 {
@ -706,18 +663,6 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe() (p1 int, p2 int, err error) {
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
p1 = int(r0)
p2 = int(r1)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) { func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset)) r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
xaddr = uintptr(r0) xaddr = uintptr(r0)
@ -749,9 +694,9 @@ func setrlimit(resource int, rlim *rlimit32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { func Alarm(seconds uint) (remaining uint, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
n = int(r0) remaining = uint(r0)
if e1 != 0 { if e1 != 0 {
err = errnoErr(e1) err = errnoErr(e1)
} }

View File

@ -1,4 +1,4 @@
// go run mksyscall.go -tags linux,mips64 syscall_linux.go syscall_linux_mips64x.go // go run mksyscall.go -tags linux,mips64 syscall_linux.go syscall_linux_mips64x.go syscall_linux_alarm.go
// Code generated by the command above; see README.md. DO NOT EDIT. // Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && mips64 //go:build linux && mips64
@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func EpollCreate(size int) (fd int, err error) {
r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(events) > 0 { if len(events) > 0 {
@ -201,7 +180,7 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pread(fd int, p []byte, offset int64) (n int, err error) { func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -218,7 +197,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pwrite(fd int, p []byte, offset int64) (n int, err error) { func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -420,17 +399,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
fd = int(r0) fd = int(r0)
@ -720,9 +688,9 @@ func stat(path string, st *stat_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { func Alarm(seconds uint) (remaining uint, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
n = int(r0) remaining = uint(r0)
if e1 != 0 { if e1 != 0 {
err = errnoErr(e1) err = errnoErr(e1)
} }

View File

@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func EpollCreate(size int) (fd int, err error) {
r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(events) > 0 { if len(events) > 0 {
@ -201,7 +180,7 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pread(fd int, p []byte, offset int64) (n int, err error) { func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -218,7 +197,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pwrite(fd int, p []byte, offset int64) (n int, err error) { func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -420,17 +399,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
fd = int(r0) fd = int(r0)
@ -717,14 +685,3 @@ func stat(path string, st *stat_t) (err error) {
} }
return return
} }
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}

View File

@ -1,4 +1,4 @@
// go run mksyscall.go -l32 -arm -tags linux,mipsle syscall_linux.go syscall_linux_mipsx.go // go run mksyscall.go -l32 -arm -tags linux,mipsle syscall_linux.go syscall_linux_mipsx.go syscall_linux_alarm.go
// Code generated by the command above; see README.md. DO NOT EDIT. // Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && mipsle //go:build linux && mipsle
@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func EpollCreate(size int) (fd int, err error) {
r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(events) > 0 { if len(events) > 0 {
@ -171,7 +150,7 @@ func Listen(s int, n int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pread(fd int, p []byte, offset int64) (n int, err error) { func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -188,7 +167,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pwrite(fd int, p []byte, offset int64) (n int, err error) { func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -365,17 +344,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
fd = int(r0) fd = int(r0)
@ -544,17 +512,6 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func InotifyInit() (fd int, err error) {
r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Ioperm(from int, num int, on int) (err error) { func Ioperm(from int, num int, on int) (err error) {
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on)) _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
if e1 != 0 { if e1 != 0 {
@ -706,18 +663,6 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe() (p1 int, p2 int, err error) {
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
p1 = int(r0)
p2 = int(r1)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) { func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset)) r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
xaddr = uintptr(r0) xaddr = uintptr(r0)
@ -749,9 +694,9 @@ func setrlimit(resource int, rlim *rlimit32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { func Alarm(seconds uint) (remaining uint, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
n = int(r0) remaining = uint(r0)
if e1 != 0 { if e1 != 0 {
err = errnoErr(e1) err = errnoErr(e1)
} }

View File

@ -1,4 +1,4 @@
// go run mksyscall.go -b32 -tags linux,ppc syscall_linux.go syscall_linux_ppc.go // go run mksyscall.go -b32 -tags linux,ppc syscall_linux.go syscall_linux_ppc.go syscall_linux_alarm.go
// Code generated by the command above; see README.md. DO NOT EDIT. // Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && ppc //go:build linux && ppc
@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func EpollCreate(size int) (fd int, err error) {
r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(events) > 0 { if len(events) > 0 {
@ -161,17 +140,6 @@ func Getuid() (uid int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func InotifyInit() (fd int, err error) {
r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Ioperm(from int, num int, on int) (err error) { func Ioperm(from int, num int, on int) (err error) {
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on)) _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
if e1 != 0 { if e1 != 0 {
@ -242,7 +210,7 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pread(fd int, p []byte, offset int64) (n int, err error) { func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -259,7 +227,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pwrite(fd int, p []byte, offset int64) (n int, err error) { func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -441,17 +409,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
fd = int(r0) fd = int(r0)
@ -717,27 +674,6 @@ func setrlimit(resource int, rlim *rlimit32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe(p *[2]_C_int) (err error) {
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func syncFileRange2(fd int, flags int, off int64, n int64) (err error) { func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off>>32), uintptr(off), uintptr(n>>32), uintptr(n)) _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off>>32), uintptr(off), uintptr(n>>32), uintptr(n))
if e1 != 0 { if e1 != 0 {
@ -760,3 +696,14 @@ func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, f
} }
return return
} }
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Alarm(seconds uint) (remaining uint, err error) {
r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
remaining = uint(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}

View File

@ -1,4 +1,4 @@
// go run mksyscall.go -tags linux,ppc64 syscall_linux.go syscall_linux_ppc64x.go // go run mksyscall.go -tags linux,ppc64 syscall_linux.go syscall_linux_ppc64x.go syscall_linux_alarm.go
// Code generated by the command above; see README.md. DO NOT EDIT. // Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && ppc64 //go:build linux && ppc64
@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func EpollCreate(size int) (fd int, err error) {
r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(events) > 0 { if len(events) > 0 {
@ -191,17 +170,6 @@ func Getuid() (uid int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func InotifyInit() (fd int, err error) {
r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Ioperm(from int, num int, on int) (err error) { func Ioperm(from int, num int, on int) (err error) {
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on)) _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
if e1 != 0 { if e1 != 0 {
@ -272,7 +240,7 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pread(fd int, p []byte, offset int64) (n int, err error) { func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -289,7 +257,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pwrite(fd int, p []byte, offset int64) (n int, err error) { func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -507,17 +475,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
fd = int(r0) fd = int(r0)
@ -763,27 +720,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe(p *[2]_C_int) (err error) {
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func syncFileRange2(fd int, flags int, off int64, n int64) (err error) { func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off), uintptr(n), 0, 0) _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off), uintptr(n), 0, 0)
if e1 != 0 { if e1 != 0 {
@ -806,3 +742,14 @@ func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, f
} }
return return
} }
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Alarm(seconds uint) (remaining uint, err error) {
r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
remaining = uint(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}

View File

@ -1,4 +1,4 @@
// go run mksyscall.go -tags linux,ppc64le syscall_linux.go syscall_linux_ppc64x.go // go run mksyscall.go -tags linux,ppc64le syscall_linux.go syscall_linux_ppc64x.go syscall_linux_alarm.go
// Code generated by the command above; see README.md. DO NOT EDIT. // Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && ppc64le //go:build linux && ppc64le
@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func EpollCreate(size int) (fd int, err error) {
r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(events) > 0 { if len(events) > 0 {
@ -191,17 +170,6 @@ func Getuid() (uid int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func InotifyInit() (fd int, err error) {
r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Ioperm(from int, num int, on int) (err error) { func Ioperm(from int, num int, on int) (err error) {
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on)) _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
if e1 != 0 { if e1 != 0 {
@ -272,7 +240,7 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pread(fd int, p []byte, offset int64) (n int, err error) { func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -289,7 +257,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pwrite(fd int, p []byte, offset int64) (n int, err error) { func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -507,17 +475,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
fd = int(r0) fd = int(r0)
@ -763,27 +720,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe(p *[2]_C_int) (err error) {
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func syncFileRange2(fd int, flags int, off int64, n int64) (err error) { func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off), uintptr(n), 0, 0) _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off), uintptr(n), 0, 0)
if e1 != 0 { if e1 != 0 {
@ -806,3 +742,14 @@ func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, f
} }
return return
} }
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Alarm(seconds uint) (remaining uint, err error) {
r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
remaining = uint(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}

View File

@ -180,7 +180,7 @@ func Listen(s int, n int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pread(fd int, p []byte, offset int64) (n int, err error) { func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -197,7 +197,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pwrite(fd int, p []byte, offset int64) (n int, err error) { func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -369,17 +369,6 @@ func Truncate(path string, length int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
fd = int(r0) fd = int(r0)

View File

@ -1,4 +1,4 @@
// go run mksyscall.go -tags linux,s390x syscall_linux.go syscall_linux_s390x.go // go run mksyscall.go -tags linux,s390x syscall_linux.go syscall_linux_s390x.go syscall_linux_alarm.go
// Code generated by the command above; see README.md. DO NOT EDIT. // Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && s390x //go:build linux && s390x
@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func EpollCreate(size int) (fd int, err error) {
r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(events) > 0 { if len(events) > 0 {
@ -191,17 +170,6 @@ func Getuid() (uid int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func InotifyInit() (fd int, err error) {
r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lchown(path string, uid int, gid int) (err error) { func Lchown(path string, uid int, gid int) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -242,7 +210,7 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pread(fd int, p []byte, offset int64) (n int, err error) { func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -259,7 +227,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pwrite(fd int, p []byte, offset int64) (n int, err error) { func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -553,17 +521,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) { func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(cmdline) _p0, err = BytePtrFromString(cmdline)
@ -576,3 +533,14 @@ func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, f
} }
return return
} }
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Alarm(seconds uint) (remaining uint, err error) {
r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
remaining = uint(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}

View File

@ -1,4 +1,4 @@
// go run mksyscall.go -tags linux,sparc64 syscall_linux.go syscall_linux_sparc64.go // go run mksyscall.go -tags linux,sparc64 syscall_linux.go syscall_linux_sparc64.go syscall_linux_alarm.go
// Code generated by the command above; see README.md. DO NOT EDIT. // Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && sparc64 //go:build linux && sparc64
@ -73,16 +73,6 @@ func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchown(fd int, uid int, gid int) (err error) { func Fchown(fd int, uid int, gid int) (err error) {
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
if e1 != 0 { if e1 != 0 {
@ -180,17 +170,6 @@ func Getuid() (uid int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func InotifyInit() (fd int, err error) {
r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lchown(path string, uid int, gid int) (err error) { func Lchown(path string, uid int, gid int) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -241,7 +220,7 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pread(fd int, p []byte, offset int64) (n int, err error) { func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -258,7 +237,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pwrite(fd int, p []byte, offset int64) (n int, err error) { func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -476,17 +455,6 @@ func Truncate(path string, length int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
fd = int(r0) fd = int(r0)
@ -721,19 +689,9 @@ func utimes(path string, times *[2]Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe(p *[2]_C_int) (err error) { func Alarm(seconds uint) (remaining uint, err error) {
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
if e1 != 0 { remaining = uint(r0)
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 { if e1 != 0 {
err = errnoErr(e1) err = errnoErr(e1)
} }

View File

@ -351,18 +351,6 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe() (fd1 int, fd2 int, err error) {
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
fd1 = int(r0)
fd2 = int(r1)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe2(p *[2]_C_int, flags int) (err error) { func pipe2(p *[2]_C_int, flags int) (err error) {
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
if e1 != 0 { if e1 != 0 {
@ -1342,7 +1330,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pread(fd int, p []byte, offset int64) (n int, err error) { func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])
@ -1359,7 +1347,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pwrite(fd int, p []byte, offset int64) (n int, err error) { func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
if len(p) > 0 { if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0]) _p0 = unsafe.Pointer(&p[0])

Some files were not shown because too many files have changed in this diff Show More