The Pedigree Project 0.1
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Private Member Functions | List of all members
SchedulerTimer Class Referenceabstract

#include <SchedulerTimer.h>

+ Inheritance diagram for SchedulerTimer:
+ Collaboration diagram for SchedulerTimer:

Public Member Functions

virtual bool registerHandler (SchedulerTimerHandler *handler)=0
 
virtual uint64_t nominalQuantumNs () const =0
 
virtual bool supportsOneShot () const
 
virtual bool armDeadline (uint64_t)
 
virtual void disarm ()
 
virtual bool removeHandler (SchedulerTimerHandler *handler)=0
 

Protected Member Functions

 SchedulerTimer ()
 
virtual ~SchedulerTimer ()
 

Static Protected Member Functions

static bool canRemoveHandlerInCurrentContext ()
 

Private Member Functions

 SchedulerTimer (const SchedulerTimer &)
 
SchedulerTimer & operator= (const SchedulerTimer &)
 

Detailed Description

Timer for scheduling

Definition at line 30 of file include/pedigree/kernel/machine/SchedulerTimer.h.

Constructor & Destructor Documentation

◆ SchedulerTimer() [1/2]

SchedulerTimer::SchedulerTimer ( )
protecteddefault

The default constructor

◆ ~SchedulerTimer()

SchedulerTimer::~SchedulerTimer ( )
protectedvirtualdefault

The destructor

◆ SchedulerTimer() [2/2]

SchedulerTimer::SchedulerTimer ( const SchedulerTimer &  )
private

The copy-constructor

Note
NOT implemented

Member Function Documentation

◆ armDeadline()

virtual bool SchedulerTimer::armDeadline ( uint64_t  )
inlinevirtual

Program an absolute monotonic deadline on the calling processor.

Definition at line 43 of file include/pedigree/kernel/machine/SchedulerTimer.h.

◆ canRemoveHandlerInCurrentContext()

bool SchedulerTimer::canRemoveHandlerInCurrentContext ( )
staticprotected

Whether current execution can provide the same-CPU drain guarantee.

Definition at line 75 of file SchedulerTimer.cc.

References ProcessorBase::executionContext(), and ProcessorBase::information().

Referenced by HostedSchedulerTimer::removeHandler(), Pit::removeHandler(), and VirtSchedulerTimer::removeHandler().

+ Here is the caller graph for this function:

◆ disarm()

virtual void SchedulerTimer::disarm ( )
inlinevirtual

Stop timer interrupts on the calling processor.

Definition at line 47 of file include/pedigree/kernel/machine/SchedulerTimer.h.

◆ operator=()

SchedulerTimer & SchedulerTimer::operator= ( const SchedulerTimer &  )
private

The assignment operator

Note
NOT implemented

◆ registerHandler()

virtual bool SchedulerTimer::registerHandler ( SchedulerTimerHandler *  handler)
pure virtual

Publish the sole hard scheduler-tick owner for the calling processor. Registration, dispatch, and removal are processor-local operations.

Implemented in HostedSchedulerTimer, Pit, and VirtSchedulerTimer.

Referenced by PerProcessorScheduler::initialise().

+ Here is the caller graph for this function:

◆ removeHandler()

virtual bool SchedulerTimer::removeHandler ( SchedulerTimerHandler *  handler)
pure virtual

Remove the calling processor's exact current owner.

A successful return is a callback-lifetime barrier: the processor's timer hard frame cannot overlap ordinary removal, and later frames no longer admit the callback. Cross-processor removal is rejected and returns false; callers must arrange teardown on the registered CPU in IRQ-enabled ordinary thread context. The callback's scoped dispatch admission rejects self-removal; hard and synthetic interrupt contexts are rejected before unpublication.

Implemented in HostedSchedulerTimer, Pit, and VirtSchedulerTimer.

◆ supportsOneShot()

virtual bool SchedulerTimer::supportsOneShot ( ) const
inlinevirtual

Whether this timer can replace periodic ticks with CPU-local deadlines.

Definition at line 39 of file include/pedigree/kernel/machine/SchedulerTimer.h.

Referenced by PerProcessorScheduler::initialise(), and Rtc::initialise3().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: