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 ¶
- func AddEpoll(t *kernel.Task, epfd int32, fd int32, flags epoll.EntryFlags, ...) error
- func CapError(name string, c linux.Capability, note string, urls []string) kernel.Syscall
- func CreateEpoll(t *kernel.Task, closeOnExec bool) (int32, error)
- func Error(name string, err error, note string, urls []string) kernel.Syscall
- func ErrorWithEvent(name string, err error, note string, urls []string) kernel.Syscall
- func PartiallySupported(name string, fn kernel.SyscallFn, note string, urls []string) kernel.Syscall
- func RemoveEpoll(t *kernel.Task, epfd int32, fd int32) error
- func Supported(name string, fn kernel.SyscallFn) kernel.Syscall
- func UpdateEpoll(t *kernel.Task, epfd int32, fd int32, flags epoll.EntryFlags, ...) error
- func WaitEpoll(t *kernel.Task, fd int32, max int, timeout int) ([]epoll.Event, error)
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 ¶
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 ¶
CreateEpoll implements the epoll_create(2) linux syscall.
func ErrorWithEvent ¶
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 ¶
RemoveEpoll implements the epoll_ctl(2) linux syscall when op is EPOLL_CTL_DEL.
Types ¶
This section is empty.