Documentation ¶
Overview ¶
Package eventfd implements event fds.
Index ¶
- func New(ctx context.Context, vfsObj *vfs.VirtualFilesystem, initVal uint64, ...) (*vfs.FileDescription, error)
- type EventFileDescription
- func (efd *EventFileDescription) Epollable() bool
- func (efd *EventFileDescription) EventRegister(entry *waiter.Entry) error
- func (efd *EventFileDescription) EventUnregister(entry *waiter.Entry)
- func (efd *EventFileDescription) HostFD() (int, error)
- func (efd *EventFileDescription) Read(ctx context.Context, dst usermem.IOSequence, _ vfs.ReadOptions) (int64, error)
- func (efd *EventFileDescription) Readiness(mask waiter.EventMask) waiter.EventMask
- func (efd *EventFileDescription) Release(context.Context)
- func (efd *EventFileDescription) Signal(val uint64) error
- func (efd *EventFileDescription) StateFields() []string
- func (efd *EventFileDescription) StateLoad(ctx context.Context, stateSourceObject state.Source)
- func (efd *EventFileDescription) StateSave(stateSinkObject state.Sink)
- func (efd *EventFileDescription) StateTypeName() string
- func (efd *EventFileDescription) Write(ctx context.Context, src usermem.IOSequence, _ vfs.WriteOptions) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ¶
func (efd *EventFileDescription) Read(ctx context.Context, dst usermem.IOSequence, _ vfs.ReadOptions) (int64, error)
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) StateFields ¶
func (efd *EventFileDescription) StateFields() []string
func (*EventFileDescription) StateLoad ¶
func (efd *EventFileDescription) StateLoad(ctx context.Context, stateSourceObject state.Source)
+checklocksignore
func (*EventFileDescription) StateSave ¶
func (efd *EventFileDescription) StateSave(stateSinkObject state.Sink)
+checklocksignore
func (*EventFileDescription) StateTypeName ¶
func (efd *EventFileDescription) StateTypeName() string
func (*EventFileDescription) Write ¶
func (efd *EventFileDescription) Write(ctx context.Context, src usermem.IOSequence, _ vfs.WriteOptions) (int64, error)
Write implements vfs.FileDescriptionImpl.Write.