Documentation
¶
Overview ¶
Code generated by gensyscall. DO NOT EDIT.
Code generated by gensyscall. DO NOT EDIT.
Index ¶
- func CurrentMachineID() int
- func IsHandledSyscall(trap uintptr) bool
- func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
- func Runtime(fun func())
- func SyscallMachineGetLabel(machineID int) (label string, err error)
- func SyscallMachineInodeInfo(machineID int, inodeID int, info *fs.InodeInfo)
- func SyscallMachineNew(label string, addr string, program any) (machineID int)
- func SyscallMachineRecoverInit(machineID int, program any) (iterID int)
- func SyscallMachineRecoverNext(iterID int) (machineID int, ok bool)
- func SyscallMachineRecoverRelease(iterID int)
- func SyscallMachineRestart(machineID int, partialDisk bool) (err error)
- func SyscallMachineSetBootProgram(machineID int, program any) (err error)
- func SyscallMachineSetSometimesCrashOnSync(machineID int, crash bool) (err error)
- func SyscallMachineStop(machineID int, graceful bool)
- func SyscallMachineWait(machineID int)
- func SyscallName(trap uintptr) string
- func SyscallPollClose(fd int, desc *syscallabi.PollDesc) (code int)
- func SyscallPollOpen(fd int, desc *syscallabi.PollDesc) (code int)
- func SyscallSetConnected(a string, b string, connected bool) (err error)
- func SyscallSetDelay(a string, b string, delay time.Duration) (err error)
- func SyscallSetSimulationTimeout(timeout time.Duration) (err error)
- func SyscallSysAccept4(s int, rsa *RawSockaddrAny, addrlen *Socklen, flags int) (fd int, err error)
- func SyscallSysBind(s int, addr unsafe.Pointer, addrlen Socklen) (err error)
- func SyscallSysChdir(path string) (err error)
- func SyscallSysClose(fd int) (err error)
- func SyscallSysConnect(s int, addr unsafe.Pointer, addrlen Socklen) (err error)
- func SyscallSysFallocate(fd int, mode uint32, off int64, len int64) (err error)
- func SyscallSysFcntl(fd int, cmd int, arg int) (val int, err error)
- func SyscallSysFcntlFlock(fd uintptr, cmd int, lk *Flock_t) (err error)
- func SyscallSysFdatasync(fd int) (err error)
- func SyscallSysFlock(fd int, how int) (err error)
- func SyscallSysFstat(fd int, stat *Stat_t) (err error)
- func SyscallSysFsync(fd int) (err error)
- func SyscallSysFtruncate(fd int, length int64) (err error)
- func SyscallSysGetcwd(buf []byte) (n int, err error)
- func SyscallSysGetdents64(fd int, buf []byte) (n int, err error)
- func SyscallSysGetpeername(fd int, rsa *RawSockaddrAny, addrlen *Socklen) (err error)
- func SyscallSysGetpid() (pid int)
- func SyscallSysGetrandom(buf []byte, flags int) (n int, err error)
- func SyscallSysGetsockname(fd int, rsa *RawSockaddrAny, addrlen *Socklen) (err error)
- func SyscallSysGetsockopt(s int, level int, name int, val unsafe.Pointer, vallen *Socklen) (err error)
- func SyscallSysListen(s int, n int) (err error)
- func SyscallSysLseek(fd int, offset int64, whence int) (off int64, err error)
- func SyscallSysMadvise(b []byte, advice int) (err error)
- func SyscallSysMkdirat(dirfd int, path string, mode uint32) (err error)
- func SyscallSysMmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
- func SyscallSysMunmap(addr uintptr, length uintptr) (err error)
- func SyscallSysNewfstatat(fd int, path string, stat *Stat_t, flags int) (err error)
- func SyscallSysOpenat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
- func SyscallSysPread64(fd int, p []byte, offset int64) (n int, err error)
- func SyscallSysPwrite64(fd int, p []byte, offset int64) (n int, err error)
- func SyscallSysRead(fd int, p []byte) (n int, err error)
- func SyscallSysRenameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
- func SyscallSysSetsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
- func SyscallSysSocket(domain int, typ int, proto int) (fd int, err error)
- func SyscallSysUname(buf *Utsname) (err error)
- func SyscallSysUnlinkat(dirfd int, path string, flags int) (err error)
- func SyscallSysWrite(fd int, p []byte) (n int, err error)
- type Dentry
- type Flock_t
- type GosimOS
- func (g *GosimOS) MachineGetLabel(machineID int, invocation *syscallabi.Syscall) (label string, err error)
- func (g *GosimOS) MachineInodeInfo(machineID int, inode int, info syscallabi.ValueView[fs.InodeInfo], ...)
- func (g *GosimOS) MachineNew(label string, addrStr string, program any, invocation *syscallabi.Syscall) (machineId int)
- func (g *GosimOS) MachineRecoverInit(machineID int, program any, invocation *syscallabi.Syscall) int
- func (g *GosimOS) MachineRecoverNext(crashIterId int, invocation *syscallabi.Syscall) (int, bool)
- func (g *GosimOS) MachineRecoverRelease(crashIterId int, invocation *syscallabi.Syscall)
- func (g *GosimOS) MachineRestart(machineID int, partialDisk bool, invocation *syscallabi.Syscall) (err error)
- func (g *GosimOS) MachineSetBootProgram(machineID int, program any, invocation *syscallabi.Syscall) (err error)
- func (g *GosimOS) MachineSetSometimesCrashOnSync(machineID int, value bool, invocation *syscallabi.Syscall) (err error)
- func (g *GosimOS) MachineStop(machineID int, graceful bool, invocation *syscallabi.Syscall)
- func (g *GosimOS) MachineWait(machineID int, invocation *syscallabi.Syscall)
- func (g *GosimOS) SetConnected(a, b string, connected bool, invocation *syscallabi.Syscall) error
- func (g *GosimOS) SetDelay(a, b string, delay time.Duration, invocation *syscallabi.Syscall) error
- func (g *GosimOS) SetSimulationTimeout(d time.Duration, invocation *syscallabi.Syscall) error
- type LinuxOS
- func (l *LinuxOS) PollClose(fd int, desc syscallabi.ValueView[syscallabi.PollDesc], ...) int
- func (l *LinuxOS) PollOpen(fd int, desc syscallabi.ValueView[syscallabi.PollDesc], ...) int
- func (l *LinuxOS) SysAccept4(fd int, rsa syscallabi.ValueView[RawSockaddrAny], ...) (int, error)
- func (l *LinuxOS) SysBind(fd int, addrPtr unsafe.Pointer, addrlen Socklen, ...) error
- func (l *LinuxOS) SysChdir(path string, invocation *syscallabi.Syscall) (err error)
- func (l *LinuxOS) SysClose(fd int, invocation *syscallabi.Syscall) error
- func (l *LinuxOS) SysConnect(fd int, addrPtr unsafe.Pointer, addrLen Socklen, ...) error
- func (l *LinuxOS) SysFallocate(fd int, mode uint32, off int64, len int64, invocation *syscallabi.Syscall) (err error)
- func (l *LinuxOS) SysFcntl(fd int, cmd int, arg int, invocation *syscallabi.Syscall) (val int, err error)
- func (l *LinuxOS) SysFcntlFlock(fd uintptr, cmd int, lk syscallabi.ValueView[Flock_t], ...) (err error)
- func (l *LinuxOS) SysFdatasync(fd int, invocation *syscallabi.Syscall) error
- func (l *LinuxOS) SysFlock(fd int, how int, invocation *syscallabi.Syscall) (err error)
- func (l *LinuxOS) SysFstat(fd int, statBuf syscallabi.ValueView[syscall.Stat_t], ...) error
- func (l *LinuxOS) SysFstatat(dirfd int, path string, statBuf syscallabi.ValueView[syscall.Stat_t], ...) error
- func (l *LinuxOS) SysFsync(fd int, invocation *syscallabi.Syscall) error
- func (l *LinuxOS) SysFtruncate(fd int, n int64, invocation *syscallabi.Syscall) error
- func (l *LinuxOS) SysGetcwd(buf syscallabi.SliceView[byte], invocation *syscallabi.Syscall) (n int, err error)
- func (l *LinuxOS) SysGetdents64(fd int, data syscallabi.ByteSliceView, invocation *syscallabi.Syscall) (int, error)
- func (l *LinuxOS) SysGetpeername(fd int, rsa syscallabi.ValueView[RawSockaddrAny], ...) error
- func (l *LinuxOS) SysGetpid(invocation *syscallabi.Syscall) int
- func (l *LinuxOS) SysGetrandom(ptr syscallabi.ByteSliceView, flags int, invocation *syscallabi.Syscall) (int, error)
- func (l *LinuxOS) SysGetsockname(fd int, rsa syscallabi.ValueView[RawSockaddrAny], ...) error
- func (l *LinuxOS) SysGetsockopt(fd int, level int, name int, ptr unsafe.Pointer, ...) error
- func (l *LinuxOS) SysListen(fd, backlog int, invocation *syscallabi.Syscall) error
- func (l *LinuxOS) SysLseek(fd int, offset int64, whence int, invocation *syscallabi.Syscall) (off int64, err error)
- func (l *LinuxOS) SysMadvise(b syscallabi.SliceView[byte], advice int, invocation *syscallabi.Syscall) (err error)
- func (l *LinuxOS) SysMkdirat(dirfd int, path string, mode uint32, invocation *syscallabi.Syscall) (err error)
- func (l *LinuxOS) SysMmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64, ...) (xaddr uintptr, err error)
- func (l *LinuxOS) SysMunmap(addr uintptr, length uintptr, invocation *syscallabi.Syscall) (err error)
- func (l *LinuxOS) SysNewfstatat(dirfd int, path string, statBuf syscallabi.ValueView[syscall.Stat_t], ...) error
- func (l *LinuxOS) SysOpenat(dirfd int, path string, flags int, mode uint32, invocation *syscallabi.Syscall) (int, error)
- func (l *LinuxOS) SysPread64(fd int, data syscallabi.ByteSliceView, offset int64, ...) (int, error)
- func (l *LinuxOS) SysPwrite64(fd int, data syscallabi.ByteSliceView, offset int64, ...) (int, error)
- func (l *LinuxOS) SysRead(fd int, data syscallabi.ByteSliceView, invocation *syscallabi.Syscall) (int, error)
- func (l *LinuxOS) SysRenameat(olddirfd int, oldpath string, newdirfd int, newpath string, ...) error
- func (l *LinuxOS) SysSetsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr, ...) (err error)
- func (l *LinuxOS) SysSocket(net, flags, proto int, invocation *syscallabi.Syscall) (int, error)
- func (l *LinuxOS) SysUname(buf syscallabi.ValueView[Utsname], invocation *syscallabi.Syscall) (err error)
- func (l *LinuxOS) SysUnlinkat(dirfd int, path string, flags int, invocation *syscallabi.Syscall) error
- func (l *LinuxOS) SysWrite(fd int, data syscallabi.ByteSliceView, invocation *syscallabi.Syscall) (int, error)
- type Machine
- type OsFile
- type RawSockaddrAny
- type Simulation
- type Socket
- type Socklen
- type Stat_t
- type Utsname
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentMachineID ¶
func CurrentMachineID() int
func IsHandledSyscall ¶
func RawSyscall6 ¶
used to be... //go:nocheckptr //go:uintptrescapes
func SyscallMachineGetLabel ¶
func SyscallMachineInodeInfo ¶
func SyscallMachineNew ¶
func SyscallMachineRecoverRelease ¶
func SyscallMachineRecoverRelease(iterID int)
func SyscallMachineRestart ¶
func SyscallMachineStop ¶
func SyscallMachineWait ¶
func SyscallMachineWait(machineID int)
func SyscallName ¶
func SyscallPollClose ¶
func SyscallPollClose(fd int, desc *syscallabi.PollDesc) (code int)
func SyscallPollOpen ¶
func SyscallPollOpen(fd int, desc *syscallabi.PollDesc) (code int)
func SyscallSysAccept4 ¶
func SyscallSysChdir ¶
func SyscallSysClose ¶
func SyscallSysConnect ¶
func SyscallSysFallocate ¶
func SyscallSysFcntlFlock ¶
This ought to call the Fcntl wrapped generated by gensyscall, but the generated Fcntl wrapper does not take a pointer, and passing a uintptr would not be safe. This wrapper works, but it does not show in the handled syscalls switch.
func SyscallSysFdatasync ¶
func SyscallSysFlock ¶
func SyscallSysFstat ¶
func SyscallSysFsync ¶
func SyscallSysFtruncate ¶
func SyscallSysGetcwd ¶
func SyscallSysGetpeername ¶
func SyscallSysGetpeername(fd int, rsa *RawSockaddrAny, addrlen *Socklen) (err error)
func SyscallSysGetpid ¶
func SyscallSysGetpid() (pid int)
func SyscallSysGetsockname ¶
func SyscallSysGetsockname(fd int, rsa *RawSockaddrAny, addrlen *Socklen) (err error)
func SyscallSysGetsockopt ¶
func SyscallSysListen ¶
func SyscallSysLseek ¶
func SyscallSysMadvise ¶
func SyscallSysMmap ¶
func SyscallSysMunmap ¶
func SyscallSysNewfstatat ¶
func SyscallSysOpenat ¶
func SyscallSysPwrite64 ¶
func SyscallSysRenameat ¶
func SyscallSysSetsockopt ¶
func SyscallSysUname ¶
Types ¶
type GosimOS ¶
type GosimOS struct {
// contains filtered or unexported fields
}
GosimOS implements all simulation-level system calls, such as creating machines, messing with the network, etc.
func NewGosimOS ¶
func NewGosimOS(s *Simulation, d syscallabi.Dispatcher) *GosimOS
func (*GosimOS) MachineGetLabel ¶
func (*GosimOS) MachineInodeInfo ¶
func (g *GosimOS) MachineInodeInfo(machineID int, inode int, info syscallabi.ValueView[fs.InodeInfo], invocation *syscallabi.Syscall)
func (*GosimOS) MachineNew ¶
func (*GosimOS) MachineRecoverInit ¶
func (*GosimOS) MachineRecoverNext ¶
func (*GosimOS) MachineRecoverRelease ¶
func (g *GosimOS) MachineRecoverRelease(crashIterId int, invocation *syscallabi.Syscall)
func (*GosimOS) MachineRestart ¶
func (*GosimOS) MachineSetBootProgram ¶
func (*GosimOS) MachineSetSometimesCrashOnSync ¶
func (*GosimOS) MachineStop ¶
func (g *GosimOS) MachineStop(machineID int, graceful bool, invocation *syscallabi.Syscall)
func (*GosimOS) MachineWait ¶
func (g *GosimOS) MachineWait(machineID int, invocation *syscallabi.Syscall)
func (*GosimOS) SetConnected ¶
func (*GosimOS) SetSimulationTimeout ¶
type LinuxOS ¶
type LinuxOS struct {
// contains filtered or unexported fields
}
LinuxOS implements gosim's versions of Linux system calls.
func NewLinuxOS ¶
func NewLinuxOS(simulation *Simulation, machine *Machine, dispatcher syscallabi.Dispatcher) *LinuxOS
func (*LinuxOS) PollClose ¶
func (l *LinuxOS) PollClose(fd int, desc syscallabi.ValueView[syscallabi.PollDesc], invocation *syscallabi.Syscall) int
func (*LinuxOS) PollOpen ¶
func (l *LinuxOS) PollOpen(fd int, desc syscallabi.ValueView[syscallabi.PollDesc], invocation *syscallabi.Syscall) int
func (*LinuxOS) SysAccept4 ¶
func (l *LinuxOS) SysAccept4(fd int, rsa syscallabi.ValueView[RawSockaddrAny], len syscallabi.ValueView[Socklen], flags int, invocation *syscallabi.Syscall) (int, error)
func (*LinuxOS) SysChdir ¶
func (l *LinuxOS) SysChdir(path string, invocation *syscallabi.Syscall) (err error)
func (*LinuxOS) SysConnect ¶
func (*LinuxOS) SysFallocate ¶
func (*LinuxOS) SysFcntlFlock ¶
func (l *LinuxOS) SysFcntlFlock(fd uintptr, cmd int, lk syscallabi.ValueView[Flock_t], invocation *syscallabi.Syscall) (err error)
func (*LinuxOS) SysFdatasync ¶
func (l *LinuxOS) SysFdatasync(fd int, invocation *syscallabi.Syscall) error
func (*LinuxOS) SysFstat ¶
func (l *LinuxOS) SysFstat(fd int, statBuf syscallabi.ValueView[syscall.Stat_t], invocation *syscallabi.Syscall) error
func (*LinuxOS) SysFstatat ¶
func (l *LinuxOS) SysFstatat(dirfd int, path string, statBuf syscallabi.ValueView[syscall.Stat_t], flags int, invocation *syscallabi.Syscall) error
arm64
func (*LinuxOS) SysFtruncate ¶
func (*LinuxOS) SysGetcwd ¶
func (l *LinuxOS) SysGetcwd(buf syscallabi.SliceView[byte], invocation *syscallabi.Syscall) (n int, err error)
func (*LinuxOS) SysGetdents64 ¶
func (l *LinuxOS) SysGetdents64(fd int, data syscallabi.ByteSliceView, invocation *syscallabi.Syscall) (int, error)
func (*LinuxOS) SysGetpeername ¶
func (l *LinuxOS) SysGetpeername(fd int, rsa syscallabi.ValueView[RawSockaddrAny], len syscallabi.ValueView[Socklen], invocation *syscallabi.Syscall) error
func (*LinuxOS) SysGetrandom ¶
func (l *LinuxOS) SysGetrandom(ptr syscallabi.ByteSliceView, flags int, invocation *syscallabi.Syscall) (int, error)
func (*LinuxOS) SysGetsockname ¶
func (l *LinuxOS) SysGetsockname(fd int, rsa syscallabi.ValueView[RawSockaddrAny], len syscallabi.ValueView[Socklen], invocation *syscallabi.Syscall) error
func (*LinuxOS) SysGetsockopt ¶
func (*LinuxOS) SysListen ¶
func (l *LinuxOS) SysListen(fd, backlog int, invocation *syscallabi.Syscall) error
func (*LinuxOS) SysMadvise ¶
func (l *LinuxOS) SysMadvise(b syscallabi.SliceView[byte], advice int, invocation *syscallabi.Syscall) (err error)
func (*LinuxOS) SysMkdirat ¶
func (*LinuxOS) SysNewfstatat ¶
func (l *LinuxOS) SysNewfstatat(dirfd int, path string, statBuf syscallabi.ValueView[syscall.Stat_t], flags int, invocation *syscallabi.Syscall) error
amd64
func (*LinuxOS) SysPread64 ¶
func (l *LinuxOS) SysPread64(fd int, data syscallabi.ByteSliceView, offset int64, invocation *syscallabi.Syscall) (int, error)
func (*LinuxOS) SysPwrite64 ¶
func (l *LinuxOS) SysPwrite64(fd int, data syscallabi.ByteSliceView, offset int64, invocation *syscallabi.Syscall) (int, error)
func (*LinuxOS) SysRead ¶
func (l *LinuxOS) SysRead(fd int, data syscallabi.ByteSliceView, invocation *syscallabi.Syscall) (int, error)
func (*LinuxOS) SysRenameat ¶
func (*LinuxOS) SysSetsockopt ¶
func (*LinuxOS) SysUname ¶
func (l *LinuxOS) SysUname(buf syscallabi.ValueView[Utsname], invocation *syscallabi.Syscall) (err error)
func (*LinuxOS) SysUnlinkat ¶
func (*LinuxOS) SysWrite ¶
func (l *LinuxOS) SysWrite(fd int, data syscallabi.ByteSliceView, invocation *syscallabi.Syscall) (int, error)
type RawSockaddrAny ¶
type RawSockaddrAny = syscall.RawSockaddrAny
type Simulation ¶
type Simulation struct {
// contains filtered or unexported fields
}
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
This program generates wrappers for system calls in gosim to ergonomically invoke them, implement them, and hook them in the go standard library.
|
This program generates wrappers for system calls in gosim to ergonomically invoke them, implement them, and hook them in the go standard library. |
Click to show internal directories.
Click to hide internal directories.