mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
advance timer state by +1 ms on suspend to avoid double-interrupts on resume
Issue #159 may be caused by queueing a connection to respond to when the timer expires, but if the timer expires twice then it tries to respond to a null connection id. And if it goes to suspend in the same millisecond as it services the condvar, then it'll reissue the interrupt when it comes back from suspend.
This commit is contained in:
parent
3bfdc238a0
commit
424f8feab7
1 changed files with 1 additions and 1 deletions
|
|
@ -243,7 +243,7 @@ mod implementation {
|
|||
self.stored_time = Some(
|
||||
(self.csr.r(utra::susres::TIME0) as u64 |
|
||||
(self.csr.r(utra::susres::TIME1) as u64) << 32)
|
||||
+ 0 // a placeholder in case we need to advance time on save
|
||||
+ 1 // a placeholder in case we need to advance time on save
|
||||
);
|
||||
#[cfg(feature = "debugprint")]
|
||||
println!("Stored time: {}", self.stored_time.unwrap());
|
||||
|
|
|
|||
Loading…
Reference in a new issue