The Pedigree Project
0.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
system
kernel
machine
hosted
kernel/machine/hosted/SchedulerTimer.h
1
/*
2
* Copyright (c) 2008-2014, Pedigree Developers
3
*
4
* Please see the CONTRIB file in the root of the source tree for a full
5
* list of contributors.
6
*
7
* Permission to use, copy, modify, and distribute this software for any
8
* purpose with or without fee is hereby granted, provided that the above
9
* copyright notice and this permission notice appear in all copies.
10
*
11
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18
*/
19
20
#ifndef KERNEL_MACHINE_HOSTED_SCHEDULERTIMER_H
21
#define KERNEL_MACHINE_HOSTED_SCHEDULERTIMER_H
22
23
#include "pedigree/kernel/machine/IrqManager.h"
24
#include "pedigree/kernel/machine/SchedulerTimer.h"
25
#include "pedigree/kernel/processor/IoPort.h"
26
#include "pedigree/kernel/processor/state.h"
27
28
namespace
__pedigree_hosted
29
{
30
#include <signal.h>
31
#include <time.h>
32
}
// namespace __pedigree_hosted
33
37
class
HostedSchedulerTimer
:
public
SchedulerTimer
,
private
IrqHandler
38
{
39
public
:
41
inline
static
HostedSchedulerTimer
&
instance
()
42
{
43
return
m_Instance;
44
}
45
46
//
47
// SchedulerTimer interface
48
//
49
virtual
bool
registerHandler(
TimerHandler
*handler);
50
53
bool
initialise()
INITIALISATION_ONLY
;
55
void
uninitialise();
56
57
protected
:
59
HostedSchedulerTimer
()
INITIALISATION_ONLY
;
61
inline
virtual
~HostedSchedulerTimer
()
62
{
63
}
64
65
private
:
68
HostedSchedulerTimer
(
const
HostedSchedulerTimer
&);
71
HostedSchedulerTimer
&operator=(
const
HostedSchedulerTimer
&);
72
73
//
74
// IrqHandler interface
75
//
76
virtual
bool
irq(irq_id_t number, InterruptState &state);
77
78
irq_id_t m_IrqId;
79
__pedigree_hosted::timer_t m_Timer;
80
82
TimerHandler
*
m_Handler
;
83
85
static
HostedSchedulerTimer
m_Instance
;
86
};
87
90
#endif
TimerHandler
Definition:
TimerHandler.h:32
IrqHandler
Definition:
IrqHandler.h:32
INITIALISATION_ONLY
#define INITIALISATION_ONLY
Definition:
system/include/pedigree/kernel/compiler.h:98
HostedSchedulerTimer::~HostedSchedulerTimer
virtual ~HostedSchedulerTimer()
Definition:
kernel/machine/hosted/SchedulerTimer.h:61
HostedSchedulerTimer::m_Instance
static HostedSchedulerTimer m_Instance
Definition:
kernel/machine/hosted/SchedulerTimer.h:85
HostedSchedulerTimer::m_Handler
TimerHandler * m_Handler
Definition:
kernel/machine/hosted/SchedulerTimer.h:82
HostedSchedulerTimer::instance
static HostedSchedulerTimer & instance()
Definition:
kernel/machine/hosted/SchedulerTimer.h:41
HostedSchedulerTimer
Definition:
kernel/machine/hosted/SchedulerTimer.h:37
SchedulerTimer
Definition:
include/pedigree/kernel/machine/SchedulerTimer.h:29
__pedigree_hosted
Definition:
core/processor/hosted/Elf.cc:25
Generated on Fri Jan 24 2020 06:46:15 for The Pedigree Project by
1.8.11