Documentation ¶
Overview ¶
Package timerfd implements the semantics of Linux timerfd objects as described by timerfd_create(2).
Index ¶
- func NewFile(ctx context.Context, c ktime.Clock) *fs.File
- type TimerOperations
- func (t *TimerOperations) Clock() ktime.Clock
- func (t *TimerOperations) EventRegister(e *waiter.Entry) error
- func (t *TimerOperations) EventUnregister(e *waiter.Entry)
- func (t *TimerOperations) GetTime() (ktime.Time, ktime.Setting)
- func (t *TimerOperations) NotifyTimer(exp uint64, setting ktime.Setting) (ktime.Setting, bool)
- func (t *TimerOperations) PauseTimer()
- func (t *TimerOperations) Read(ctx context.Context, file *fs.File, dst usermem.IOSequence, offset int64) (int64, error)
- func (t *TimerOperations) Readiness(mask waiter.EventMask) waiter.EventMask
- func (t *TimerOperations) Release(context.Context)
- func (t *TimerOperations) ResumeTimer()
- func (t *TimerOperations) SetTime(s ktime.Setting) (ktime.Time, ktime.Setting)
- func (t *TimerOperations) Write(context.Context, *fs.File, usermem.IOSequence, int64) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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) EventRegister ¶
func (t *TimerOperations) EventRegister(e *waiter.Entry) error
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) NotifyTimer ¶
NotifyTimer implements ktime.TimerListener.NotifyTimer.
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(context.Context)
Release implements fs.FileOperations.Release.
func (*TimerOperations) ResumeTimer ¶
func (t *TimerOperations) ResumeTimer()
ResumeTimer resumes the associated Timer.