(part of) a patch by Dustin Howett (GSOC) which implements HPET timers. I'm committing this work split in small patches, since HPET timers aren't working correctly yet, and I won't commit the parts which don't work.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27127 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -37,9 +37,9 @@ extern timer_info gAPICTimer;
|
||||
extern timer_info gHPETTimer;
|
||||
|
||||
static timer_info *sTimers[] = {
|
||||
&gPITTimer,
|
||||
// &gHPETTimer,
|
||||
&gAPICTimer,
|
||||
&gHPETTimer,
|
||||
&gPITTimer,
|
||||
NULL
|
||||
};
|
||||
|
||||
@@ -70,14 +70,18 @@ arch_init_timer(kernel_args *args)
|
||||
cpu_status state = disable_interrupts();
|
||||
|
||||
for (i = 0; (timer = sTimers[i]) != NULL; i++) {
|
||||
int priority;
|
||||
int priority = timer->get_priority();
|
||||
|
||||
if (priority < bestPriority) {
|
||||
TRACE(("arch_init_timer: Skipping %s because there is a higher priority timer (%s) initialized.\n", timer->name, sTimer->name));
|
||||
continue;
|
||||
}
|
||||
|
||||
if (timer->init(args) != B_OK) {
|
||||
TRACE(("arch_init_timer: %s failed init. Skipping.\n", timer->name));
|
||||
continue;
|
||||
}
|
||||
|
||||
priority = timer->get_priority();
|
||||
|
||||
if (priority > bestPriority) {
|
||||
bestPriority = priority;
|
||||
sTimer = timer;
|
||||
|
||||
Reference in New Issue
Block a user