timerfd

package
v0.0.0-...-e4c45ee Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: Apache-2.0, MIT Imports: 9 Imported by: 0

Documentation

Overview

Package timerfd implements timer fds.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, vfsObj *vfs.VirtualFilesystem, clock ktime.Clock, flags uint32) (*vfs.FileDescription, error)

New returns a new timer fd.

Types

type TimerFileDescription

type TimerFileDescription struct {
	vfs.FileDescriptionDefaultImpl
	vfs.DentryMetadataFileDescriptionImpl
	vfs.NoLockFD
	// contains filtered or unexported fields
}

TimerFileDescription implements vfs.FileDescriptionImpl for timer fds. It also implements ktime.TimerListener.

+stateify savable

func (*TimerFileDescription) Clock

func (tfd *TimerFileDescription) Clock() ktime.Clock

Clock returns the timer fd's Clock.

func (*TimerFileDescription) Epollable

func (tfd *TimerFileDescription) Epollable() bool

Epollable implements FileDescriptionImpl.Epollable.

func (*TimerFileDescription) EventRegister

func (tfd *TimerFileDescription) EventRegister(e *waiter.Entry) error

EventRegister implements waiter.Waitable.EventRegister.

func (*TimerFileDescription) EventUnregister

func (tfd *TimerFileDescription) EventUnregister(e *waiter.Entry)

EventUnregister implements waiter.Waitable.EventUnregister.

func (*TimerFileDescription) GetTime

func (tfd *TimerFileDescription) GetTime() (ktime.Time, ktime.Setting)

GetTime returns the associated Timer's setting and the time at which it was observed.

func (*TimerFileDescription) NotifyTimer

func (tfd *TimerFileDescription) NotifyTimer(exp uint64, setting ktime.Setting) (ktime.Setting, bool)

NotifyTimer implements ktime.TimerListener.NotifyTimer.

func (*TimerFileDescription) PauseTimer

func (tfd *TimerFileDescription) PauseTimer()

PauseTimer pauses the associated Timer.

func (*TimerFileDescription) Read

Read implements vfs.FileDescriptionImpl.Read.

func (*TimerFileDescription) Readiness

func (tfd *TimerFileDescription) Readiness(mask waiter.EventMask) waiter.EventMask

Readiness implements waiter.Waitable.Readiness.

func (*TimerFileDescription) Release

func (tfd *TimerFileDescription) Release(context.Context)

Release implements vfs.FileDescriptionImpl.Release.

func (*TimerFileDescription) ResumeTimer

func (tfd *TimerFileDescription) ResumeTimer()

ResumeTimer resumes the associated Timer.

func (*TimerFileDescription) SetTime

SetTime atomically changes the associated Timer's setting, resets the number of expirations to 0, and returns the previous setting and the time at which it was observed.

func (*TimerFileDescription) StateFields

func (tfd *TimerFileDescription) StateFields() []string

func (*TimerFileDescription) StateLoad

func (tfd *TimerFileDescription) StateLoad(stateSourceObject state.Source)

+checklocksignore

func (*TimerFileDescription) StateSave

func (tfd *TimerFileDescription) StateSave(stateSinkObject state.Sink)

+checklocksignore

func (*TimerFileDescription) StateTypeName

func (tfd *TimerFileDescription) StateTypeName() string

Jump to

Keyboard shortcuts

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