Documentation ¶
Overview ¶
Package fasync provides FIOASYNC related functionality.
Index ¶
- func New(fd int) func() vfs.FileAsync
- type FileAsync
- func (a *FileAsync) ClearOwner()
- func (a *FileAsync) NotifyEvent(mask waiter.EventMask)
- func (a *FileAsync) Owner() (*kernel.Task, *kernel.ThreadGroup, *kernel.ProcessGroup)
- func (a *FileAsync) Register(w waiter.Waitable) error
- func (a *FileAsync) SetOwnerProcessGroup(requester *kernel.Task, recipient *kernel.ProcessGroup)
- func (a *FileAsync) SetOwnerTask(requester *kernel.Task, recipient *kernel.Task)
- func (a *FileAsync) SetOwnerThreadGroup(requester *kernel.Task, recipient *kernel.ThreadGroup)
- func (a *FileAsync) SetSignal(signal linux.Signal) error
- func (a *FileAsync) Signal() linux.Signal
- func (a *FileAsync) Unregister(w waiter.Waitable)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ¶
NotifyEvent implements waiter.EventListener.NotifyEvent.
func (*FileAsync) Owner ¶
func (a *FileAsync) Owner() (*kernel.Task, *kernel.ThreadGroup, *kernel.ProcessGroup)
Owner returns who is currently getting signals. All return values will be nil if no one is set to receive signals.
func (*FileAsync) Register ¶
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 ¶
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 ¶
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 ¶
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 ¶
Unregister stops monitoring a file.
The file must be currently registered.