eventfd

package
v0.0.0-...-23e6066 Latest Latest
Warning

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

Go to latest
Published: May 3, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package eventfd provides an implementation of Linux's file-based event notification.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, initVal uint64, semMode bool) *fs.File

New creates a new event object with the supplied initial value and mode.

Types

type EventOperations

type EventOperations struct {
	fsutil.NoopRelease   `state:"nosave"`
	fsutil.PipeSeek      `state:"nosave"`
	fsutil.NotDirReaddir `state:"nosave"`
	fsutil.NoFsync       `state:"nosave"`
	fsutil.NoopFlush     `state:"nosave"`
	fsutil.NoMMap        `state:"nosave"`
	fsutil.NoIoctl       `state:"nosave"`

	// Queue is used to notify interested parties when the event object
	// becomes readable or writable.
	waiter.Queue `state:"nosave"`
	// contains filtered or unexported fields
}

EventOperations represents an event with the semantics of Linux's file-based event notification (eventfd).

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) Signal

func (e *EventOperations) Signal(val uint64) error

Signal is an internal function to signal the event fd.

func (*EventOperations) Write

func (e *EventOperations) Write(ctx context.Context, _ *fs.File, src usermem.IOSequence, _ int64) (int64, error)

Write implements fs.FileOperations.Write.

Jump to

Keyboard shortcuts

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