File tree Expand file tree Collapse file tree
minibar-ignition-server/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -786,7 +786,9 @@ impl NotificationHandler for ServerImpl {
786786 }
787787
788788 fn handle_notification ( & mut self , bits : u32 ) {
789- if ( bits & notifications:: TIMER_MASK ) != 0 {
789+ if ( bits & notifications:: TIMER_MASK ) != 0
790+ && userlib:: sys_get_timer ( ) . deadline . is_none ( )
791+ {
790792 self . step_hash ( ) ;
791793 }
792794 }
Original file line number Diff line number Diff line change @@ -893,7 +893,9 @@ impl NotificationHandler for ServerImpl {
893893 self . handle_sequencer_interrupt ( ) ;
894894 }
895895
896- if ( bits & notifications:: TIMER_MASK ) == 0 {
896+ if ( bits & notifications:: TIMER_MASK ) == 0
897+ || sys_get_timer ( ) . deadline . is_some ( )
898+ {
897899 return ;
898900 }
899901 let state = self . log_state_registers ( ) ;
Original file line number Diff line number Diff line change @@ -948,7 +948,9 @@ impl NotificationHandler for ServerImpl {
948948 }
949949
950950 fn handle_notification ( & mut self , bits : u32 ) {
951- if ( bits & notifications:: TIMER_MASK ) != 0 {
951+ if ( bits & notifications:: TIMER_MASK ) != 0
952+ && userlib:: sys_get_timer ( ) . deadline . is_none ( )
953+ {
952954 self . step_hash ( ) ;
953955 }
954956 }
Original file line number Diff line number Diff line change @@ -545,7 +545,9 @@ impl<S: SpiServer> NotificationHandler for ServerImpl<S> {
545545 self . vcore . handle_notification ( self . ereport_buf ) ;
546546 }
547547
548- if ( bits & notifications:: TIMER_MASK ) == 0 {
548+ if ( bits & notifications:: TIMER_MASK ) == 0
549+ || sys_get_timer ( ) . deadline . is_some ( )
550+ {
549551 return ;
550552 }
551553
Original file line number Diff line number Diff line change @@ -421,6 +421,10 @@ impl idol_runtime::NotificationHandler for ServerImpl {
421421 }
422422
423423 fn handle_notification ( & mut self , _bits : u32 ) {
424+ if sys_get_timer ( ) . deadline . is_some ( ) {
425+ return ;
426+ }
427+
424428 let start = sys_get_timer ( ) . now ;
425429
426430 // Only poll the presence summary if the port count seems reasonable. A
Original file line number Diff line number Diff line change @@ -112,6 +112,10 @@ impl NotificationHandler for ServerImpl {
112112 }
113113
114114 fn handle_notification ( & mut self , _bits : u32 ) {
115+ if userlib:: sys_get_timer ( ) . deadline . is_some ( ) {
116+ return ;
117+ }
118+
115119 let user_leds =
116120 drv_user_leds_api:: UserLeds :: from ( USER_LEDS . get_task_id ( ) ) ;
117121
Original file line number Diff line number Diff line change @@ -399,6 +399,10 @@ impl idol_runtime::NotificationHandler for ServerImpl {
399399 }
400400
401401 fn handle_notification ( & mut self , _bits : u32 ) {
402+ if sys_get_timer ( ) . deadline . is_some ( ) {
403+ return ;
404+ }
405+
402406 let start = sys_get_timer ( ) . now ;
403407
404408 // Only poll the presence summary if the port count seems reasonable. A
Original file line number Diff line number Diff line change @@ -134,7 +134,9 @@ impl NotificationHandler for ServerImpl {
134134 }
135135
136136 fn handle_notification ( & mut self , bits : u32 ) {
137- if ( bits & notifications:: TIMER_MASK ) == 0 {
137+ if ( bits & notifications:: TIMER_MASK ) == 0
138+ || sys_get_timer ( ) . deadline . is_some ( )
139+ {
138140 return ;
139141 }
140142 let start = sys_get_timer ( ) . now ;
Original file line number Diff line number Diff line change @@ -469,7 +469,10 @@ fn main() -> ! {
469469
470470 // Wait for a pin change or timer.
471471 let n = sys_recv_notification ( sleep_notifications) ;
472- if n & notifications:: TIMER_MASK != 0 {
472+ // If the timer bit is set _and the timer has actually fired_...
473+ if n & notifications:: TIMER_MASK != 0
474+ && sys_get_timer ( ) . deadline . is_none ( )
475+ {
473476 // Reset our timer forward.
474477 sys_set_timer (
475478 Some ( now. saturating_add ( POLL_MS ) ) ,
Original file line number Diff line number Diff line change @@ -775,6 +775,10 @@ impl NotificationHandler for ServerImpl {
775775 }
776776
777777 fn handle_notification ( & mut self , _bits : u32 ) {
778+ if sys_get_timer ( ) . deadline . is_some ( ) {
779+ return ;
780+ }
781+
778782 let start = sys_get_timer ( ) . now ;
779783
780784 // Determine if the front IO board has been initialized and no further
You can’t perform that action at this time.
0 commit comments