abi

package
v0.0.0-...-989fa2c Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: Apache-2.0, MIT Imports: 4 Imported by: 0

Documentation

Overview

Package abi describes the interface between a kernel and userspace.

Index

Constants

View Source
const Host = Linux

Host specifies the host ABI.

Variables

This section is empty.

Functions

This section is empty.

Types

type ABI

type ABI interface {
}

ABI is an interface that defines OS-specific interactions.

type FlagSet

type FlagSet []struct {
	Flag uint64
	Name string
}

A FlagSet is a slice of bit-flags and their name.

func (FlagSet) Parse

func (s FlagSet) Parse(val uint64) string

Parse returns a pretty version of val, using the flag names for known flags. Unknown flags remain numeric.

type OS

type OS int

OS describes the target operating system for an ABI.

Note that OS is architecture-independent. The details of the OS ABI will vary between architectures.

const (
	// Linux is the Linux ABI.
	Linux OS = iota
)

func (OS) String

func (o OS) String() string

String implements fmt.Stringer.

type ValueSet

type ValueSet map[uint64]string

ValueSet is a map of syscall values to their name. Parse will use the name or the value if unknown.

func (ValueSet) Parse

func (s ValueSet) Parse(val uint64) string

Parse returns the name of the value associated with `val`. Unknown values are converted to hex.

func (ValueSet) ParseDecimal

func (s ValueSet) ParseDecimal(val uint64) string

ParseDecimal returns the name of the value associated with `val`. Unknown values are converted to decimal.

func (ValueSet) ParseName

func (s ValueSet) ParseName(name string) (uint64, bool)

ParseName returns the flag value associated with 'name'. Returns false if no value is found.

Directories

Path Synopsis
Package gasket describes the userspace interface for Gasket devices.
Package gasket describes the userspace interface for Gasket devices.
Package linux contains the constants and types needed to interface with a Linux kernel.
Package linux contains the constants and types needed to interface with a Linux kernel.
errno
Package errno holds errno codes for abi/linux.
Package errno holds errno codes for abi/linux.
Package nvgpu tracks the ABI of the Nvidia GPU Linux kernel driver: https://github.com/NVIDIA/open-gpu-kernel-modules
Package nvgpu tracks the ABI of the Nvidia GPU Linux kernel driver: https://github.com/NVIDIA/open-gpu-kernel-modules

Jump to

Keyboard shortcuts

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