The Pedigree Project
0.1
|
Classes | |
class | Alarm |
Public Member Functions | |
virtual bool | registerHandler (TimerHandler *handler) |
virtual bool | unregisterHandler (TimerHandler *handler) |
virtual void | addAlarm (class Event *pEvent, size_t alarmSecs, size_t alarmUsecs=0) |
virtual void | removeAlarm (class Event *pEvent) |
virtual size_t | removeAlarm (class Event *pEvent, bool bRetZero) |
virtual size_t | getYear () |
virtual uint8_t | getMonth () |
virtual uint8_t | getDayOfMonth () |
virtual uint8_t | getDayOfWeek () |
virtual uint8_t | getHour () |
virtual uint8_t | getMinute () |
virtual uint8_t | getSecond () |
virtual uint64_t | getNanosecond () |
virtual uint64_t | getTickCount () |
virtual uint64_t | getTickCountNano () |
bool | initialise () INITIALISATION_ONLY |
virtual void | synchronise (bool tohw=false) |
void | uninitialise () |
Public Member Functions inherited from Timer | |
virtual Time::Timestamp | getUnixTimestamp () |
Static Public Member Functions | |
static HostedTimer & | instance () |
Protected Member Functions | |
HostedTimer () INITIALISATION_ONLY | |
virtual | ~HostedTimer () |
Protected Member Functions inherited from Timer | |
Timer () | |
virtual | ~Timer () |
Private Member Functions | |
HostedTimer (const HostedTimer &) | |
HostedTimer & | operator= (const HostedTimer &) |
virtual bool | irq (irq_id_t number, InterruptState &state) |
virtual | ~IrqHandler () |
Private Attributes | |
size_t | m_Year |
uint8_t | m_Month |
uint8_t | m_DayOfMonth |
uint8_t | m_DayOfWeek |
uint8_t | m_Hour |
uint8_t | m_Minute |
uint8_t | m_Second |
uint64_t | m_Nanosecond |
__pedigree_hosted::timer_t | m_Timer |
irq_id_t | m_IrqId |
TimerHandler * | m_Handlers [MAX_TIMER_HANDLERS] |
List< Alarm * > | m_Alarms |
Static Private Attributes | |
static HostedTimer | m_Instance |
Definition at line 38 of file kernel/machine/hosted/Timer.h.
|
protected |
The default constructor
Definition at line 253 of file hosted/Timer.cc.
|
inlineprotectedvirtual |
The destructor
Definition at line 78 of file kernel/machine/hosted/Timer.h.
|
private |
The copy-constructor
|
virtual |
Dispatches the Event pEvent
to the current thread in alarmSecs
time.
pEvent | Event to dispatch. |
alarmSecs | Number of seconds to wait. |
Implements Timer.
Definition at line 42 of file hosted/Timer.cc.
References Processor::information().
|
virtual |
Get the current day of month
Implements Timer.
Definition at line 139 of file hosted/Timer.cc.
|
virtual |
Get the current day of week
Implements Timer.
Definition at line 144 of file hosted/Timer.cc.
|
virtual |
Get the current hour
Implements Timer.
Definition at line 149 of file hosted/Timer.cc.
|
virtual |
Get the current minute
Implements Timer.
Definition at line 154 of file hosted/Timer.cc.
|
virtual |
Get the current month
Implements Timer.
Definition at line 134 of file hosted/Timer.cc.
|
virtual |
Get the current nanosecond
Implements Timer.
Definition at line 164 of file hosted/Timer.cc.
|
virtual |
Get the current second
Implements Timer.
Definition at line 159 of file hosted/Timer.cc.
|
virtual |
Get the Tick count (time elapsed since system bootup)
Implements Timer.
Definition at line 169 of file hosted/Timer.cc.
Referenced by irq().
|
virtual |
Get the Tick count (time elapsed since system bootup) in nanosconds.
Reimplemented from Timer.
Definition at line 176 of file hosted/Timer.cc.
|
virtual |
Get the current year
Implements Timer.
Definition at line 129 of file hosted/Timer.cc.
bool HostedTimer::initialise | ( | ) |
Initialises the class
Definition at line 183 of file hosted/Timer.cc.
References IrqManager::registerIsaIrqHandler().
Referenced by HostedMachine::initialise().
|
privatevirtual |
Called when the handler is registered with the irq manager and the irq occurred
[in] | number | the irq number |
Implements IrqHandler.
Definition at line 260 of file hosted/Timer.cc.
References g_FreePages, Machine::getSerial(), getTickCount(), m_Alarms, m_DayOfMonth, m_Handlers, m_Hour, m_Minute, m_Month, m_Nanosecond, m_Second, m_Year, Thread::sendEvent(), IrqManager::tick(), TimerHandler::timer(), and UNLIKELY.
|
private |
The assignment operator
|
virtual |
Removes the event pEvent
from the alarm queue.
pEvent | Event to remove alarm for. |
Implements Timer.
Definition at line 50 of file hosted/Timer.cc.
|
virtual |
Removes the event pEvent
from the alarm queue.
pEvent | Event to remove alarm for. |
bRetZero | If true, returns zero rather the time until firing |
Implements Timer.
Definition at line 63 of file hosted/Timer.cc.
|
virtual |
Synchronise the time/date with the hardware
Reimplemented from Timer.
Definition at line 223 of file hosted/Timer.cc.
void HostedTimer::uninitialise | ( | ) |
Uninitialises the class
Definition at line 242 of file hosted/Timer.cc.
References IrqManager::unregisterHandler().
|
private |
The current day of month
Definition at line 100 of file kernel/machine/hosted/Timer.h.
Referenced by irq().
|
private |
The current day of week
Definition at line 102 of file kernel/machine/hosted/Timer.h.
|
private |
All timer handlers installed
Definition at line 122 of file kernel/machine/hosted/Timer.h.
Referenced by irq().
|
private |
|
staticprivate |
The HostedTimer class instance
Definition at line 119 of file kernel/machine/hosted/Timer.h.
|
private |
Registered handler.
Definition at line 116 of file kernel/machine/hosted/Timer.h.
|
private |
The current minute
Definition at line 106 of file kernel/machine/hosted/Timer.h.
Referenced by irq().
|
private |
|
private |
The current nanosecond
Definition at line 110 of file kernel/machine/hosted/Timer.h.
Referenced by irq().
|
private |
The current second
Definition at line 108 of file kernel/machine/hosted/Timer.h.
Referenced by irq().
|
private |
Tick source.
Definition at line 113 of file kernel/machine/hosted/Timer.h.
|
private |