syscalls

package
v0.0.0-...-ff2c174 Latest Latest
Warning

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

Go to latest
Published: May 9, 2021 License: Apache-2.0, MIT Imports: 9 Imported by: 0

Documentation

Overview

Package syscalls is the interface from the application to the kernel. Traditionally, syscalls is the interface that is used by applications to request services from the kernel of a operating system. We provide a user-mode kernel that needs to handle those requests coming from unmodified applications. Therefore, we still use the term "syscalls" to denote this interface.

Note that the stubs in this package may merely provide the interface, not the actual implementation. It just makes writing syscall stubs straightforward.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddEpoll

func AddEpoll(t *kernel.Task, epfd int32, fd int32, flags epoll.EntryFlags, mask waiter.EventMask, userData [2]int32) error

AddEpoll implements the epoll_ctl(2) linux syscall when op is EPOLL_CTL_ADD.

func CapError

func CapError(name string, c linux.Capability, note string, urls []string) kernel.Syscall

CapError gives a syscall function that checks for capability c. If the task has the capability, it returns ENOSYS, otherwise EPERM. To unprivileged tasks, it will seem like there is an implementation.

func CreateEpoll

func CreateEpoll(t *kernel.Task, closeOnExec bool) (int32, error)

CreateEpoll implements the epoll_create(2) linux syscall.

func Error

func Error(name string, err error, note string, urls []string) kernel.Syscall

Error returns a syscall handler that will always give the passed error.

func ErrorWithEvent

func ErrorWithEvent(name string, err error, note string, urls []string) kernel.Syscall

ErrorWithEvent gives a syscall function that sends an unimplemented syscall event via the event channel and returns the passed error.

func PartiallySupported

func PartiallySupported(name string, fn kernel.SyscallFn, note string, urls []string) kernel.Syscall

PartiallySupported returns a syscall that has a partial implementation.

func RemoveEpoll

func RemoveEpoll(t *kernel.Task, epfd int32, fd int32) error

RemoveEpoll implements the epoll_ctl(2) linux syscall when op is EPOLL_CTL_DEL.

func Supported

func Supported(name string, fn kernel.SyscallFn) kernel.Syscall

Supported returns a syscall that is fully supported.

func UpdateEpoll

func UpdateEpoll(t *kernel.Task, epfd int32, fd int32, flags epoll.EntryFlags, mask waiter.EventMask, userData [2]int32) error

UpdateEpoll implements the epoll_ctl(2) linux syscall when op is EPOLL_CTL_MOD.

func WaitEpoll

func WaitEpoll(t *kernel.Task, fd int32, max int, timeoutInNanos int64) ([]linux.EpollEvent, error)

WaitEpoll implements the epoll_wait(2) linux syscall.

Types

This section is empty.

Directories

Path Synopsis
Package linux provides syscall tables for amd64 Linux.
Package linux provides syscall tables for amd64 Linux.
vfs2
Package vfs2 provides syscall implementations that use VFS2.
Package vfs2 provides syscall implementations that use VFS2.

Jump to

Keyboard shortcuts

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