native

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2017 License: MIT Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Select

func Select(nfds int, readFds, writeFds *syscall.FdSet, timespec *Timespec) (int, error)

Types

type DarwinStatfs32_t

type DarwinStatfs32_t struct {
	Otype       int16
	Oflags      int16
	Bsize       int
	Iosize      int
	Blocks      int
	Bfree       int
	Bavail      int
	Files       int
	Ffree       int
	Fsid        syscall.Fsid
	Owner       int
	Reserved1   int16
	Type        int16
	Flags       int32
	Reserved2   int32
	Fstypename  [13]byte
	Mntonname   [90]byte
	Mntfromname [90]byte
	Reserved3   byte
	Reserved4   [4]int
}

func StatfsToDarwin32

func StatfsToDarwin32(s *syscall.Statfs_t) *DarwinStatfs32_t

type DarwinStatfs64_t

type DarwinStatfs64_t struct {
	Bsize       uint32
	Iosize      int32
	Blocks      uint64
	Bfree       uint64
	Bavail      uint64
	Files       uint64
	Ffree       uint64
	Fsid        syscall.Fsid
	Owner       int
	Type        uint32
	Flags       uint32
	Fssubtype   uint32
	Fstypename  [16]byte
	Mntonname   [1024]byte
	Mntfromname [1024]byte
	Reserved    [8]uint32
}

func StatfsToDarwin64

func StatfsToDarwin64(s *syscall.Statfs_t) *DarwinStatfs64_t

type Fdset32

type Fdset32 struct {
	Bits [32]int32
}

func (*Fdset32) Clear

func (f *Fdset32) Clear(fd int)

func (*Fdset32) Fds

func (f *Fdset32) Fds() []int

func (*Fdset32) IsSet

func (f *Fdset32) IsSet(fd int) bool

func (*Fdset32) Native

func (f *Fdset32) Native() *syscall.FdSet

TODO: 32-bit vs 64-bit

func (*Fdset32) Set

func (f *Fdset32) Set(fd int)

func (*Fdset32) String

func (f *Fdset32) String() string

func (*Fdset32) To64

func (f *Fdset32) To64() (out [16]int64)

type Itimerval

type Itimerval struct {
	Interval Timespec
	Value    Timespec
}

type LinuxStatfs_t

type LinuxStatfs_t struct {
	Type    int64  `struc:"off_t"`
	Bsize   int64  `struc:"off_t"`
	Blocks  uint64 `struc:"size_t"`
	Bfree   uint64 `struc:"size_t"`
	Bavail  uint64 `struc:"size_t"`
	Files   uint64 `struc:"size_t"`
	Ffree   uint64 `struc:"size_t"`
	Fsid    syscall.Fsid
	Namelen int64
	// fragment size, whatever that is
	Frsize int64 `struc:"off_t"`
	// since linux 2.6
	Flags int64    `struc:"off_t"`
	Spare [5]int64 `struc:"off_t"`
}

func StatfsToLinux

func StatfsToLinux(s *syscall.Statfs_t) *LinuxStatfs_t

type Timespec

type Timespec struct {
	Sec  int64 `struc:"off_t"`
	Nsec int64 `struc:"off_t"`
}

func (*Timespec) Native

func (t *Timespec) Native() *syscall.Timeval

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL