fasync

package
v0.0.0-...-4810afc Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: Apache-2.0, MIT Imports: 6 Imported by: 3

Documentation

Overview

Package fasync provides FIOASYNC related functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(fd int) func() vfs.FileAsync

New returns a function that creates a new vfs.FileAsync with the given file descriptor.

Types

type FileAsync

type FileAsync struct {
	// contains filtered or unexported fields
}

FileAsync sends signals when the registered file is ready for IO.

+stateify savable

func (*FileAsync) ClearOwner

func (a *FileAsync) ClearOwner()

ClearOwner unsets the current signal recipient.

func (*FileAsync) NotifyEvent

func (a *FileAsync) NotifyEvent(mask waiter.EventMask)

NotifyEvent implements waiter.EventListener.NotifyEvent.

func (*FileAsync) Owner

Owner returns who is currently getting signals. All return values will be nil if no one is set to receive signals.

func (*FileAsync) Register

func (a *FileAsync) Register(w waiter.Waitable) error

Register sets the file which will be monitored for IO events.

The file must not be currently registered.

func (*FileAsync) SetOwnerProcessGroup

func (a *FileAsync) SetOwnerProcessGroup(requester *kernel.Task, recipient *kernel.ProcessGroup)

SetOwnerProcessGroup sets the owner (who will receive signals) to a specified process group. Only this owner will receive signals.

func (*FileAsync) SetOwnerTask

func (a *FileAsync) SetOwnerTask(requester *kernel.Task, recipient *kernel.Task)

SetOwnerTask sets the owner (who will receive signals) to a specified task. Only this owner will receive signals.

func (*FileAsync) SetOwnerThreadGroup

func (a *FileAsync) SetOwnerThreadGroup(requester *kernel.Task, recipient *kernel.ThreadGroup)

SetOwnerThreadGroup sets the owner (who will receive signals) to a specified thread group. Only this owner will receive signals.

func (*FileAsync) SetSignal

func (a *FileAsync) SetSignal(signal linux.Signal) error

SetSignal overrides which signal to send when I/O is available. The default behavior can be reset by specifying signal zero, which means to send SIGIO.

func (*FileAsync) Signal

func (a *FileAsync) Signal() linux.Signal

Signal returns which signal will be sent to the signal recipient. A value of zero means the signal to deliver wasn't customized, which means the default signal (SIGIO) will be delivered.

func (*FileAsync) Unregister

func (a *FileAsync) Unregister(w waiter.Waitable)

Unregister stops monitoring a file.

The file must be currently registered.

Jump to

Keyboard shortcuts

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