eventfd

package
v0.0.0-...-ae1d4cc Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0, MIT Imports: 13 Imported by: 5

Documentation

Overview

Package eventfd implements event fds.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, vfsObj *vfs.VirtualFilesystem, initVal uint64, semMode bool, flags uint32) (*vfs.FileDescription, error)

New creates a new event fd.

Types

type EventFileDescription

type EventFileDescription struct {
	vfs.FileDescriptionDefaultImpl
	vfs.DentryMetadataFileDescriptionImpl
	vfs.NoLockFD
	// contains filtered or unexported fields
}

EventFileDescription implements vfs.FileDescriptionImpl for file-based event notification (eventfd). Eventfds are usually internal to the Sentry but in certain situations they may be converted into a host-backed eventfd.

+stateify savable

func (*EventFileDescription) Epollable

func (efd *EventFileDescription) Epollable() bool

Epollable implements FileDescriptionImpl.Epollable.

func (*EventFileDescription) EventRegister

func (efd *EventFileDescription) EventRegister(entry *waiter.Entry) error

EventRegister implements waiter.Waitable.EventRegister.

func (*EventFileDescription) EventUnregister

func (efd *EventFileDescription) EventUnregister(entry *waiter.Entry)

EventUnregister implements waiter.Waitable.EventUnregister.

func (*EventFileDescription) HostFD

func (efd *EventFileDescription) HostFD() (int, error)

HostFD returns the host eventfd associated with this event.

func (*EventFileDescription) Read

Read implements vfs.FileDescriptionImpl.Read.

func (*EventFileDescription) Readiness

func (efd *EventFileDescription) Readiness(mask waiter.EventMask) waiter.EventMask

Readiness implements waiter.Waitable.Readiness.

func (*EventFileDescription) Release

func (efd *EventFileDescription) Release(context.Context)

Release implements vfs.FileDescriptionImpl.Release.

func (*EventFileDescription) Signal

func (efd *EventFileDescription) Signal(val uint64) error

Signal is an internal function to signal the event fd.

func (*EventFileDescription) Write

Write implements vfs.FileDescriptionImpl.Write.

Jump to

Keyboard shortcuts

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