timerfd

package
v0.0.0-...-522126a Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package timerfd implements the semantics of Linux timerfd objects as described by timerfd_create(2).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFile

func NewFile(ctx context.Context, c ktime.Clock) *fs.File

NewFile returns a timerfd File that receives time from c.

Types

type TimerOperations

type TimerOperations struct {
	fsutil.FileZeroSeek             `state:"nosave"`
	fsutil.FileNotDirReaddir        `state:"nosave"`
	fsutil.FileNoFsync              `state:"nosave"`
	fsutil.FileNoIoctl              `state:"nosave"`
	fsutil.FileNoMMap               `state:"nosave"`
	fsutil.FileNoSplice             `state:"nosave"`
	fsutil.FileNoopFlush            `state:"nosave"`
	fsutil.FileUseInodeUnstableAttr `state:"nosave"`
	// contains filtered or unexported fields
}

TimerOperations implements fs.FileOperations for timerfds.

+stateify savable

func (*TimerOperations) Clock

func (t *TimerOperations) Clock() ktime.Clock

Clock returns the associated Timer's Clock.

func (*TimerOperations) Destroy

func (t *TimerOperations) Destroy()

Destroy implements ktime.TimerListener.Destroy.

func (*TimerOperations) EventRegister

func (t *TimerOperations) EventRegister(e *waiter.Entry, mask waiter.EventMask)

EventRegister implements waiter.Waitable.EventRegister.

func (*TimerOperations) EventUnregister

func (t *TimerOperations) EventUnregister(e *waiter.Entry)

EventUnregister implements waiter.Waitable.EventUnregister.

func (*TimerOperations) GetTime

func (t *TimerOperations) GetTime() (ktime.Time, ktime.Setting)

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

func (*TimerOperations) Notify

func (t *TimerOperations) Notify(exp uint64, setting ktime.Setting) (ktime.Setting, bool)

Notify implements ktime.TimerListener.Notify.

func (*TimerOperations) PauseTimer

func (t *TimerOperations) PauseTimer()

PauseTimer pauses the associated Timer.

func (*TimerOperations) Read

func (t *TimerOperations) Read(ctx context.Context, file *fs.File, dst usermem.IOSequence, offset int64) (int64, error)

Read implements fs.FileOperations.Read.

func (*TimerOperations) Readiness

func (t *TimerOperations) Readiness(mask waiter.EventMask) waiter.EventMask

Readiness implements waiter.Waitable.Readiness.

func (*TimerOperations) Release

func (t *TimerOperations) Release()

Release implements fs.FileOperations.Release.

func (*TimerOperations) ResumeTimer

func (t *TimerOperations) ResumeTimer()

ResumeTimer resumes the associated Timer.

func (*TimerOperations) SetTime

func (t *TimerOperations) SetTime(s ktime.Setting) (ktime.Time, ktime.Setting)

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 (*TimerOperations) Write

Write implements fs.FileOperations.Write.

Jump to

Keyboard shortcuts

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