Fix apic timer
This commit is contained in:
parent
39d78a950b
commit
a157fdf059
10
src/apic.js
10
src/apic.js
|
@ -394,9 +394,13 @@ APIC.prototype.timer = function(now)
|
|||
|
||||
if(mode === APIC_TIMER_MODE_PERIODIC)
|
||||
{
|
||||
// This isn't exact, because timer_current_count might already be
|
||||
// negative at this point since timer() fires late
|
||||
this.timer_current_count = this.timer_initial_count;
|
||||
this.timer_current_count = this.timer_current_count % this.timer_initial_count;
|
||||
|
||||
if(this.timer_current_count <= 0)
|
||||
{
|
||||
this.timer_current_count += this.timer_initial_count;
|
||||
}
|
||||
dbg_assert(this.timer_current_count !== 0);
|
||||
|
||||
if((this.lvt_timer & IOAPIC_CONFIG_MASKED) === 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue