timerfd

package
v0.0.0-...-f7ad032 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0, MIT Imports: 8 Imported by: 6

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)

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.

Jump to

Keyboard shortcuts

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