added more debug output
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23155 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
099fb2d3be
commit
4b4e08cc67
@ -25,6 +25,13 @@
|
||||
|
||||
#include "interrupts.h"
|
||||
|
||||
//#define TRACE_TIMER
|
||||
#ifdef TRACE_TIMER
|
||||
# define TRACE(x) dprintf x
|
||||
#else
|
||||
# define TRACE(x) ;
|
||||
#endif
|
||||
|
||||
|
||||
#define PIT_CLOCK_RATE 1193180
|
||||
#define PIT_MAX_TIMER_INTERVAL (0xffff * 1000000ll / PIT_CLOCK_RATE)
|
||||
@ -75,6 +82,7 @@ apic_timer_interrupt(void)
|
||||
void
|
||||
arch_timer_set_hardware_timer(bigtime_t timeout)
|
||||
{
|
||||
TRACE(("arch_timer_set_hardware_timer: timeout %lld\n", timeout));
|
||||
// try the apic timer first
|
||||
if (arch_smp_set_apic_timer(timeout) != B_OK)
|
||||
set_isa_hardware_timer(timeout);
|
||||
@ -84,6 +92,7 @@ arch_timer_set_hardware_timer(bigtime_t timeout)
|
||||
void
|
||||
arch_timer_clear_hardware_timer(void)
|
||||
{
|
||||
TRACE(("arch_timer_clear_hardware_timer\n"));
|
||||
if (arch_smp_clear_apic_timer() != B_OK)
|
||||
clear_isa_hardware_timer();
|
||||
}
|
||||
|
@ -93,6 +93,8 @@ restart_scan:
|
||||
|
||||
release_spinlock(spinlock);
|
||||
|
||||
TRACE(("timer_interrupt: calling hook %p for event %p\n", event->hook, event));
|
||||
|
||||
// call the callback
|
||||
// note: if the event is not periodic, it is ok
|
||||
// to delete the event structure inside the callback
|
||||
@ -140,6 +142,8 @@ add_timer(timer *event, timer_hook hook, bigtime_t period, int32 flags)
|
||||
if (event == NULL || hook == NULL || period < 0)
|
||||
return B_BAD_VALUE;
|
||||
|
||||
TRACE(("add_timer: event %p\n", event));
|
||||
|
||||
scheduleTime = period;
|
||||
if (flags != B_ONE_SHOT_ABSOLUTE_TIMER)
|
||||
scheduleTime += currentTime;
|
||||
@ -214,6 +218,8 @@ cancel_timer(timer *event)
|
||||
int currentCPU = smp_get_current_cpu();
|
||||
cpu_status state;
|
||||
|
||||
TRACE(("cancel_timer: event %p\n", event));
|
||||
|
||||
state = disable_interrupts();
|
||||
|
||||
// walk through all of the cpu's timer queues
|
||||
|
Loading…
Reference in New Issue
Block a user