* Made waiting for a timer handler more power usage friendly.
* Minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25101 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
#include <thread.h>
|
#include <thread.h>
|
||||||
#include <util/AutoLock.h>
|
#include <util/AutoLock.h>
|
||||||
|
|
||||||
|
|
||||||
struct per_cpu_timer_data {
|
struct per_cpu_timer_data {
|
||||||
spinlock lock;
|
spinlock lock;
|
||||||
timer* volatile events;
|
timer* volatile events;
|
||||||
@@ -27,13 +28,6 @@ struct per_cpu_timer_data {
|
|||||||
|
|
||||||
static per_cpu_timer_data sPerCPU[B_MAX_CPU_COUNT];
|
static per_cpu_timer_data sPerCPU[B_MAX_CPU_COUNT];
|
||||||
|
|
||||||
/*
|
|
||||||
static timer * volatile sEvents[B_MAX_CPU_COUNT] = { NULL, };
|
|
||||||
static timer * volatile sCurrentEvents[B_MAX_CPU_COUNT] = { NULL, };
|
|
||||||
static spinlock sCurrentEventsCompletion[B_MAX_CPU_COUNT];
|
|
||||||
static spinlock sTimerSpinlock[B_MAX_CPU_COUNT] = { 0, };
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
//#define TRACE_TIMER
|
//#define TRACE_TIMER
|
||||||
#ifdef TRACE_TIMER
|
#ifdef TRACE_TIMER
|
||||||
@@ -290,7 +284,7 @@ cancel_timer(timer *event)
|
|||||||
spinLocker.Unlock();
|
spinLocker.Unlock();
|
||||||
|
|
||||||
while (cpuData.current_event_in_progress == 1) {
|
while (cpuData.current_event_in_progress == 1) {
|
||||||
// spin
|
PAUSE();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user