Documentation ¶
Index ¶
- Constants
- func Errno(err error) uint64
- func NewDarwinStat(stat *syscall.Stat_t, bits uint) interface{}
- func NewLinuxStat(stat *syscall.Stat_t, bits uint) interface{}
- func NewTargetStat(stat *syscall.Stat_t, os string, bits uint) interface{}
- func PathFromFd(dirfd int) (string, error)
- func StackInit(u models.Usercorn, args, env []string, auxv []byte) error
- func Uname(buf co.Buf, un *models.Uname)
- type DarwinStat
- type DarwinStat64
- type File
- type Iovec32
- type Iovec64
- type LinuxStat
- type LinuxStat64
- type PosixKernel
- func (k *PosixKernel) Access(path string, amode uint32) uint64
- func (k *PosixKernel) Bind(fd co.Fd, sa syscall.Sockaddr, size co.Len) uint64
- func (k *PosixKernel) Brk(addr uint64) uint64
- func (k *PosixKernel) Chdir(path string) uint64
- func (k *PosixKernel) Chmod(path string, mode uint32) uint64
- func (k *PosixKernel) Chown(path string, uid, gid int) uint64
- func (k *PosixKernel) Chroot(path string) uint64
- func (k *PosixKernel) ClockGetres(clockid int, out co.Obuf) uint64
- func (k *PosixKernel) ClockGettime(_ int, out co.Obuf) uint64
- func (k *PosixKernel) Close(fd co.Fd) uint64
- func (k *PosixKernel) Connect(fd co.Fd, sa syscall.Sockaddr, size co.Len) uint64
- func (k *PosixKernel) Dup(oldFd co.Fd) uint64
- func (k *PosixKernel) Dup2(oldFd co.Fd, newFd co.Fd) uint64
- func (k *PosixKernel) Execve(path string, argvBuf, envpBuf co.Buf) uint64
- func (k *PosixKernel) Exit(code int)
- func (k *PosixKernel) ExitGroup(code int)
- func (k *PosixKernel) Fchmod(fd int, mode uint32) uint64
- func (k *PosixKernel) Fchown(fd, uid, gid int) uint64
- func (k *PosixKernel) Fcntl(fd co.Fd, cmd int)
- func (k *PosixKernel) Fstat(fd co.Fd, buf co.Obuf) uint64
- func (k *PosixKernel) Fstatfs(fd co.Fd, statfs co.Obuf) uint64
- func (k *PosixKernel) Getcwd(buf co.Obuf, size co.Len) uint64
- func (k *PosixKernel) Getegid() int
- func (k *PosixKernel) Geteuid() int
- func (k *PosixKernel) Getgid() int
- func (k *PosixKernel) Getgroups(count int, buf co.Buf) uint64
- func (k *PosixKernel) Getitimer(which int, value *native.Itimerval, ovalue co.Obuf) uint64
- func (k *PosixKernel) Getpgid(pid int) uint64
- func (k *PosixKernel) Getpgrp() int
- func (k *PosixKernel) Getpid() int
- func (k *PosixKernel) Getppid() int
- func (k *PosixKernel) Getsockopt(fd co.Fd, level, opt int, valueOut, valueSizeOut co.Buf) uint64
- func (k *PosixKernel) Gettid() int
- func (k *PosixKernel) Getuid() int
- func (k *PosixKernel) Ioctl(fd co.Fd, req uint64)
- func (k *PosixKernel) Kill(pid, signal int) uint64
- func (k *PosixKernel) Lchown(path string, uid, gid int) uint64
- func (k *PosixKernel) Link(src, dst string) uint64
- func (k *PosixKernel) Lseek(fd co.Fd, offset co.Off, whence int) uint64
- func (k *PosixKernel) Lstat(path string, buf co.Obuf) uint64
- func (k *PosixKernel) Madvise()
- func (k *PosixKernel) Mlock()
- func (k *PosixKernel) Mlockall()
- func (k *PosixKernel) Mmap(addrHint, size uint64, prot enum.MmapProt, flags enum.MmapFlag, fd co.Fd, ...) uint64
- func (k *PosixKernel) Mmap2(addrHint, size uint64, prot enum.MmapProt, flags enum.MmapFlag, fd co.Fd, ...) uint64
- func (k *PosixKernel) Mprotect(addr, size uint64, prot enum.MmapProt) uint64
- func (k *PosixKernel) Munlock()
- func (k *PosixKernel) Munlockall()
- func (k *PosixKernel) Munmap(addr, size uint64) uint64
- func (k *PosixKernel) Open(path string, flags enum.OpenFlag, mode uint64) uint64
- func (k *PosixKernel) Openat(dirfd co.Fd, path string, flags enum.OpenFlag, mode uint64) uint64
- func (k *PosixKernel) Pipe(files co.Buf) uint64
- func (k *PosixKernel) Pipe2(files co.Buf, flags int) uint64
- func (k *PosixKernel) Pread64(fd co.Fd, buf co.Obuf, size co.Len, offset int64) uint64
- func (k *PosixKernel) Pwrite64(fd co.Fd, buf co.Buf, size co.Len, offset int64) uint64
- func (k *PosixKernel) Read(fd co.Fd, buf co.Obuf, size co.Len) uint64
- func (k *PosixKernel) Readlink(path string, buf co.Obuf, size co.Len) uint64
- func (k *PosixKernel) Readv(fd co.Fd, iov co.Buf, count uint64) uint64
- func (k *PosixKernel) Recvfrom(fd co.Fd, buf co.Buf, size co.Len, flags int, from co.Buf, fromlen co.Len) uint64
- func (k *PosixKernel) RtSigaction()
- func (k *PosixKernel) RtSigprocmask()
- func (k *PosixKernel) SchedYield()
- func (k *PosixKernel) Select(args []co.Obuf, nfds int, readfds, writefds, errorfds *native.Fdset32, ...) uint64
- func (k *PosixKernel) Sendto(fd co.Fd, buf co.Buf, size co.Len, flags int, sa syscall.Sockaddr, ...) uint64
- func (k *PosixKernel) Setgid(gid int) int
- func (k *PosixKernel) Setitimer(which int, value co.Obuf) uint64
- func (k *PosixKernel) Setsockopt(fd co.Fd, level, opt int, valueIn co.Buf, size int) uint64
- func (k *PosixKernel) Setuid(uid int) int
- func (k *PosixKernel) Shutdown(fd co.Fd, how int) uint64
- func (k *PosixKernel) Socket(domain, typ, protocol int) uint64
- func (k *PosixKernel) Socketpair(domain, typ, proto int, vector co.Obuf) uint64
- func (k *PosixKernel) Stat(path string, buf co.Obuf) uint64
- func (k *PosixKernel) Statfs(path string, statfs co.Obuf) uint64
- func (k *PosixKernel) Swapoff()
- func (k *PosixKernel) Swapon()
- func (k *PosixKernel) Symlink(src, dst string) uint64
- func (k *PosixKernel) Time(out co.Obuf) uint64
- func (k *PosixKernel) Unlink(path string) uint64
- func (k *PosixKernel) Write(fd co.Fd, buf co.Buf, size co.Len) uint64
- func (k *PosixKernel) Writev(fd co.Fd, iov co.Buf, count uint64) uint64
Constants ¶
View Source
const UINT64_MAX = 0xFFFFFFFFFFFFFFFF
Variables ¶
This section is empty.
Functions ¶
func NewDarwinStat ¶
func NewLinuxStat ¶
func PathFromFd ¶
Types ¶
type DarwinStat ¶
type DarwinStat struct { }
type DarwinStat64 ¶
type DarwinStat64 struct { }
type LinuxStat ¶
type LinuxStat struct { Dev uint32 Ino uint32 Mode uint16 Nlink uint16 Uid, Gid uint32 Rdev uint32 Size uint32 Blksize uint32 Blkcnt uint32 Atime uint32 AtimeNsec uint32 Mtime uint32 MtimeNsec uint32 Ctime uint32 CtimeNsec uint32 Reserved4 uint32 Reserved5 uint32 }
TODO: these might only work on x86
type LinuxStat64 ¶
type PosixKernel ¶
func NewKernel ¶
func NewKernel() *PosixKernel
func (*PosixKernel) Brk ¶
func (k *PosixKernel) Brk(addr uint64) uint64
func (*PosixKernel) Chdir ¶
func (k *PosixKernel) Chdir(path string) uint64
func (*PosixKernel) Chroot ¶
func (k *PosixKernel) Chroot(path string) uint64
func (*PosixKernel) ClockGetres ¶
func (k *PosixKernel) ClockGetres(clockid int, out co.Obuf) uint64
func (*PosixKernel) ClockGettime ¶
func (k *PosixKernel) ClockGettime(_ int, out co.Obuf) uint64
func (*PosixKernel) Execve ¶
func (k *PosixKernel) Execve(path string, argvBuf, envpBuf co.Buf) uint64
func (*PosixKernel) Exit ¶
func (k *PosixKernel) Exit(code int)
func (*PosixKernel) ExitGroup ¶
func (k *PosixKernel) ExitGroup(code int)
func (*PosixKernel) Fchown ¶
func (k *PosixKernel) Fchown(fd, uid, gid int) uint64
func (*PosixKernel) Getegid ¶
func (k *PosixKernel) Getegid() int
func (*PosixKernel) Geteuid ¶
func (k *PosixKernel) Geteuid() int
func (*PosixKernel) Getgid ¶
func (k *PosixKernel) Getgid() int
func (*PosixKernel) Getpgid ¶
func (k *PosixKernel) Getpgid(pid int) uint64
func (*PosixKernel) Getpgrp ¶
func (k *PosixKernel) Getpgrp() int
func (*PosixKernel) Getpid ¶
func (k *PosixKernel) Getpid() int
func (*PosixKernel) Getppid ¶
func (k *PosixKernel) Getppid() int
func (*PosixKernel) Getsockopt ¶
func (*PosixKernel) Gettid ¶
func (k *PosixKernel) Gettid() int
func (*PosixKernel) Getuid ¶
func (k *PosixKernel) Getuid() int
func (*PosixKernel) Kill ¶
func (k *PosixKernel) Kill(pid, signal int) uint64
func (*PosixKernel) Link ¶
func (k *PosixKernel) Link(src, dst string) uint64
func (*PosixKernel) Madvise ¶
func (k *PosixKernel) Madvise()
func (*PosixKernel) Mlock ¶
func (k *PosixKernel) Mlock()
func (*PosixKernel) Mlockall ¶
func (k *PosixKernel) Mlockall()
func (*PosixKernel) Mprotect ¶
func (k *PosixKernel) Mprotect(addr, size uint64, prot enum.MmapProt) uint64
func (*PosixKernel) Munlock ¶
func (k *PosixKernel) Munlock()
func (*PosixKernel) Munlockall ¶
func (k *PosixKernel) Munlockall()
func (*PosixKernel) Munmap ¶
func (k *PosixKernel) Munmap(addr, size uint64) uint64
func (*PosixKernel) RtSigaction ¶
func (k *PosixKernel) RtSigaction()
func (*PosixKernel) RtSigprocmask ¶
func (k *PosixKernel) RtSigprocmask()
func (*PosixKernel) SchedYield ¶
func (k *PosixKernel) SchedYield()
func (*PosixKernel) Setgid ¶
func (k *PosixKernel) Setgid(gid int) int
func (*PosixKernel) Setitimer ¶
func (k *PosixKernel) Setitimer(which int, value co.Obuf) uint64
TODO: candidate for enum conversion but OS X and Linux appeared to have the same values for now TODO: these are stubbed because they're mostly for progress bars afaik
func (*PosixKernel) Setsockopt ¶
func (*PosixKernel) Setuid ¶
func (k *PosixKernel) Setuid(uid int) int
func (*PosixKernel) Socket ¶
func (k *PosixKernel) Socket(domain, typ, protocol int) uint64
func (*PosixKernel) Socketpair ¶
func (k *PosixKernel) Socketpair(domain, typ, proto int, vector co.Obuf) uint64
func (*PosixKernel) Swapoff ¶
func (k *PosixKernel) Swapoff()
func (*PosixKernel) Swapon ¶
func (k *PosixKernel) Swapon()
func (*PosixKernel) Symlink ¶
func (k *PosixKernel) Symlink(src, dst string) uint64
func (*PosixKernel) Unlink ¶
func (k *PosixKernel) Unlink(path string) uint64
Click to show internal directories.
Click to hide internal directories.