eventfd

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventFD

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

func New

func New() (*EventFD, error)

Create a new EventFD.

func (*EventFD) Close

func (e *EventFD) Close() error

Close the eventfd

func (*EventFD) Fd

func (e *EventFD) Fd() int

Returns the filedescriptor which is internally used

func (*EventFD) Read

func (e *EventFD) Read(p []byte) (int, error)

Read events from Eventfd. p should be at max 8 bytes. * Returns the number of read bytes or 0 and error is set.

func (*EventFD) ReadEvents

func (e *EventFD) ReadEvents() (uint64, error)

Read events into a uint64 and return it. Returns 0 and error * if an error occured

func (*EventFD) Write

func (e *EventFD) Write(p []byte) (int, error)

Write bytes to eventfd. Will be added to the current * value of the internal uint64 of the eventfd().

func (*EventFD) WriteEvents

func (e *EventFD) WriteEvents(val uint64) error

Write a uint64 to eventfd. Value will be added to current value * of the eventfd

Jump to

Keyboard shortcuts

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