1 // Copyright 2015 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
9 func ptrace1(request int, pid int, addr uintptr, data uintptr) error {
13 func setTimespec(sec, nsec int64) Timespec {
14 return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
17 func setTimeval(sec, usec int64) Timeval {
18 return Timeval{Sec: int32(sec), Usec: int32(usec)}
21 func SetKevent(k *Kevent_t, fd, mode, flags int) {
23 k.Filter = int16(mode)
24 k.Flags = uint16(flags)
27 func (iov *Iovec) SetLen(length int) {
28 iov.Len = uint32(length)
31 func (msghdr *Msghdr) SetControllen(length int) {
32 msghdr.Controllen = uint32(length)
35 func (msghdr *Msghdr) SetIovlen(length int) {
36 msghdr.Iovlen = int32(length)
39 func (cmsg *Cmsghdr) SetLen(length int) {
40 cmsg.Len = uint32(length)
43 func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic
45 //sys Fstat(fd int, stat *Stat_t) (err error)
46 //sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
47 //sys Fstatfs(fd int, stat *Statfs_t) (err error)
48 //sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT
49 //sys Lstat(path string, stat *Stat_t) (err error)
50 //sys Stat(path string, stat *Stat_t) (err error)
51 //sys Statfs(path string, stat *Statfs_t) (err error)