|
The Pedigree Project 0.1
|
#include <Pit.h>
Inheritance diagram for Pit:
Collaboration diagram for Pit:Public Member Functions | |
| virtual bool | registerHandler (SchedulerTimerHandler *handler) |
| uint64_t | nominalQuantumNs () const override |
| virtual bool | removeHandler (SchedulerTimerHandler *handler) |
| bool | initialise () INITIALISATION_ONLY |
| void | uninitialise () |
Public Member Functions inherited from SchedulerTimer | |
| virtual bool | supportsOneShot () const |
| virtual bool | armDeadline (uint64_t) |
| virtual void | disarm () |
Static Public Member Functions | |
| static Pit & | instance () |
Protected Member Functions | |
| Pit () INITIALISATION_ONLY | |
| virtual | ~Pit () |
Protected Member Functions inherited from SchedulerTimer | |
| SchedulerTimer () | |
| virtual | ~SchedulerTimer () |
Private Member Functions | |
| Pit (const Pit &) | |
| Pit & | operator= (const Pit &) |
| virtual void | schedulerIrq (irq_id_t number, InterruptState &state) |
Private Attributes | |
| IoPort | m_IoPort |
| irq_id_t | m_IrqId |
| SchedulerTimerHandlerSlot | m_Handler |
Static Private Attributes | |
| static Pit | m_Instance |
Additional Inherited Members | |
Static Protected Member Functions inherited from SchedulerTimer | |
| static bool | canRemoveHandlerInCurrentContext () |
The programmable interval timer implements the SchedulerTimer interface
|
private |
The copy-constructor
| bool Pit::initialise | ( | ) |
Initialises the class
Definition at line 51 of file Pit.cc.
References IoPort::allocate(), m_IoPort, m_IrqId, IrqManager::registerSchedulerIrqHandler(), and IoPort::write8().
Referenced by Pc::initialise().
Here is the caller graph for this function:
|
inlinestatic |
Get the Pit class instance
Definition at line 41 of file Pit.h.
References m_Instance.
Referenced by Pc::deinitialise(), Pc::getSchedulerTimer(), and Pc::initialise().
Here is the caller graph for this function:
|
overridevirtual |
Implements SchedulerTimer.
|
virtual |
Publish the sole hard scheduler-tick owner for the calling processor. Registration, dispatch, and removal are processor-local operations.
Implements SchedulerTimer.
Definition at line 43 of file Pit.cc.
References m_Handler, and SchedulerTimerHandlerSlot::publish().
|
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.
Implements SchedulerTimer.
Definition at line 47 of file Pit.cc.
References SchedulerTimer::canRemoveHandlerInCurrentContext(), m_Handler, and SchedulerTimerHandlerSlot::unpublish().
|
privatevirtual |
Implements SchedulerIrqHandler.
| void Pit::uninitialise | ( | ) |
Uninitialises the class
Definition at line 81 of file Pit.cc.
References IoPort::free(), m_IoPort, m_IrqId, and IrqManager::unregisterSchedulerIrqHandler().
Referenced by Pc::deinitialise().
Here is the caller graph for this function:
|
private |
The atomically published scheduler callback owner.
Definition at line 82 of file Pit.h.
Referenced by registerHandler(), and removeHandler().
|
staticprivate |
|
private |
The PIT I/O port range
Definition at line 78 of file Pit.h.
Referenced by initialise(), and uninitialise().
|
private |