projects
/
sx
/
simavr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
regExp
home
|
summary
|
tags
|
heads
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
raw
|
patch
| inline |
side by side
(parent:
2062c2d
)
Commit
5bc1f43dbedbb3d38fafaff0f60868377756e02f
author
Max Schwarz
<max.schwarz@online.de>
Mon, 26 Oct 2015 11:15:30 +0000
(12:15 +0100)
committer
Max Schwarz
<max.schwarz@online.de>
Mon, 26 Oct 2015 11:15:30 +0000
(12:15 +0100)
The variable 'mini' is a FIFO index, not a direct index into the buffer!
Add the current read pointer to fix the operation.
Fixes a regression introduced in
599733f261f94317489c2cc8751fb84fd604e6fa
.
simavr/sim/sim_interrupts.c
patch
|
blob
|
history
|
download
diff --git
a/simavr/sim/sim_interrupts.c
b/simavr/sim/sim_interrupts.c
index 0022795a3a369aba19b74ca7a2bad92d710dc271..651af3ee8115775c32f6d9ce88779b8d190a82f3 100644
(file)
--- a/
simavr/sim/sim_interrupts.c
+++ b/
simavr/sim/sim_interrupts.c
@@
-248,7
+248,7
@@
avr_service_interrupts(
// now move the one at the front of the fifo in the slot of
// the one we service
- table->pending.buffer[
mini % avr_int_pending_fifo_size] =
+ table->pending.buffer[
(table->pending.read + mini) % avr_int_pending_fifo_size] =
avr_int_pending_read(&table->pending);
avr_raise_irq(avr->interrupts.irq + AVR_INT_IRQ_PENDING,
avr_has_pending_interrupts(avr));