timerfd

package
v0.0.0-...-4bf4b70 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2021 License: Apache-2.0, MIT Imports: 8 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) Destroy

func (tfd *TimerFileDescription) Destroy()

Destroy implements ktime.TimerListener.Destroy.

func (*TimerFileDescription) EventRegister

func (tfd *TimerFileDescription) EventRegister(e *waiter.Entry, mask waiter.EventMask)

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

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

Notify implements ktime.TimerListener.Notify.

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)

func (*TimerFileDescription) StateSave

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

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