File tree Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -119,28 +119,26 @@ void perfc_port_insert_to_system_timer_insert_ovf_handler(void)
119
119
*/
120
120
__IRQ_SAFE {
121
121
s_lSystemClockCounts += lLoad ;
122
+ }
122
123
123
- // update system ms counter
124
- do {
125
- int64_t lTemp = s_wMSResidule + lLoad ;
124
+ // update system ms counter
125
+ __IRQ_SAFE {
126
+ int64_t lTemp = s_wMSResidule + lLoad ;
126
127
127
- int64_t lMS = lTemp / s_wMSUnit ;
128
- s_lSystemMS += lMS ;
129
- s_wMSResidule = (uint32_t )((int64_t )lTemp - (int64_t )lMS * s_wMSUnit );
128
+ int64_t lMS = lTemp / s_wMSUnit ;
129
+ s_lSystemMS += lMS ;
130
130
131
- } while ( 0 );
131
+ s_wMSResidule = ( uint32_t )(( int64_t ) lTemp - ( int64_t ) lMS * s_wMSUnit );
132
132
}
133
133
134
+ // update system us counter
134
135
__IRQ_SAFE {
135
- // update system us counter
136
- do {
137
- int64_t lTemp = s_wUSResidule + lLoad ;
136
+ int64_t lTemp = s_wUSResidule + lLoad ;
138
137
139
- int64_t lUS = lTemp / s_wUSUnit ;
140
- s_lSystemUS += lUS ;
138
+ int64_t lUS = lTemp / s_wUSUnit ;
139
+ s_lSystemUS += lUS ;
141
140
142
- s_wUSResidule = (uint32_t )((int64_t )lTemp - (int64_t )lUS * s_wUSUnit );
143
- } while (0 );
141
+ s_wUSResidule = (uint32_t )((int64_t )lTemp - (int64_t )lUS * s_wUSUnit );
144
142
}
145
143
}
146
144
You can’t perform that action at this time.
0 commit comments