Documentation ¶
Overview ¶
Package eventfd provides an implementation of Linux's file-based event notification.
Index ¶
- func New(ctx context.Context, initVal uint64, semMode bool) *fs.File
- type EventOperations
- func (e *EventOperations) EventRegister(entry *waiter.Entry, mask waiter.EventMask)
- func (e *EventOperations) EventUnregister(entry *waiter.Entry)
- func (e *EventOperations) HostFD() (int, error)
- func (e *EventOperations) Read(ctx context.Context, _ *fs.File, dst usermem.IOSequence, _ int64) (int64, error)
- func (e *EventOperations) Readiness(mask waiter.EventMask) waiter.EventMask
- func (e *EventOperations) Release(context.Context)
- func (e *EventOperations) Signal(val uint64) error
- func (e *EventOperations) StateFields() []string
- func (e *EventOperations) StateLoad(stateSourceObject state.Source)
- func (e *EventOperations) StateSave(stateSinkObject state.Sink)
- func (e *EventOperations) StateTypeName() string
- func (e *EventOperations) Write(ctx context.Context, _ *fs.File, src usermem.IOSequence, _ int64) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EventOperations ¶
type EventOperations struct { fsutil.FileNoopRelease `state:"nosave"` fsutil.FilePipeSeek `state:"nosave"` fsutil.FileNotDirReaddir `state:"nosave"` fsutil.FileNoFsync `state:"nosave"` fsutil.FileNoIoctl `state:"nosave"` fsutil.FileNoMMap `state:"nosave"` fsutil.FileNoSplice `state:"nosave"` fsutil.FileNoopFlush `state:"nosave"` fsutil.FileUseInodeUnstableAttr `state:"nosave"` // contains filtered or unexported fields }
EventOperations represents an event with the semantics of Linux's 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 (*EventOperations) EventRegister ¶
func (e *EventOperations) EventRegister(entry *waiter.Entry, mask waiter.EventMask)
EventRegister implements waiter.Waitable.EventRegister.
func (*EventOperations) EventUnregister ¶
func (e *EventOperations) EventUnregister(entry *waiter.Entry)
EventUnregister implements waiter.Waitable.EventUnregister.
func (*EventOperations) HostFD ¶
func (e *EventOperations) HostFD() (int, error)
HostFD returns the host eventfd associated with this event.
func (*EventOperations) Read ¶
func (e *EventOperations) Read(ctx context.Context, _ *fs.File, dst usermem.IOSequence, _ int64) (int64, error)
Read implements fs.FileOperations.Read.
func (*EventOperations) Readiness ¶
func (e *EventOperations) Readiness(mask waiter.EventMask) waiter.EventMask
Readiness returns the ready events for the event fd.
func (*EventOperations) Release ¶
func (e *EventOperations) Release(context.Context)
Release implements fs.FileOperations.Release.
func (*EventOperations) Signal ¶
func (e *EventOperations) Signal(val uint64) error
Signal is an internal function to signal the event fd.
func (*EventOperations) StateFields ¶
func (e *EventOperations) StateFields() []string
func (*EventOperations) StateLoad ¶
func (e *EventOperations) StateLoad(stateSourceObject state.Source)
func (*EventOperations) StateSave ¶
func (e *EventOperations) StateSave(stateSinkObject state.Sink)
func (*EventOperations) StateTypeName ¶
func (e *EventOperations) StateTypeName() string