More optimizations.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14759 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
5dec8a8f1f
commit
1b95d15504
|
@ -334,6 +334,7 @@ void chVTDoResetI(virtual_timer_t *vtp) {
|
||||||
|
|
||||||
/* If the list become empty then the alarm timer is stopped and done.*/
|
/* If the list become empty then the alarm timer is stopped and done.*/
|
||||||
if (ch_dlist_isempty(&vtlp->dlist)) {
|
if (ch_dlist_isempty(&vtlp->dlist)) {
|
||||||
|
|
||||||
port_timer_stop_alarm();
|
port_timer_stop_alarm();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -481,15 +482,18 @@ void chVTDoTickI(void) {
|
||||||
is re-entered on the callback return. Note that "lasttime" can be
|
is re-entered on the callback return. Note that "lasttime" can be
|
||||||
modified within the callback if some timer function is called.*/
|
modified within the callback if some timer function is called.*/
|
||||||
chSysUnlockFromISR();
|
chSysUnlockFromISR();
|
||||||
|
|
||||||
vtp->func(vtp, vtp->par);
|
vtp->func(vtp, vtp->par);
|
||||||
|
|
||||||
chSysLockFromISR();
|
chSysLockFromISR();
|
||||||
now = chVTGetSystemTimeX();
|
|
||||||
/* If a reload is defined the timer needs to be restarted.*/
|
/* If a reload is defined the timer needs to be restarted.*/
|
||||||
if (unlikely(vtp->reload > (sysinterval_t)0)) {
|
if (unlikely(vtp->reload > (sysinterval_t)0)) {
|
||||||
sysinterval_t delay;
|
sysinterval_t delay;
|
||||||
|
|
||||||
/* Refreshing the now delta after spending time in the callback for
|
/* Refreshing the now delta after spending time in the callback for
|
||||||
a more accurate detection of too fast reloads.*/
|
a more accurate detection of too fast reloads.*/
|
||||||
|
now = chVTGetSystemTimeX();
|
||||||
nowdelta = chTimeDiffX(lasttime, now);
|
nowdelta = chTimeDiffX(lasttime, now);
|
||||||
|
|
||||||
#if !defined(CH_VT_RFCU_DISABLED)
|
#if !defined(CH_VT_RFCU_DISABLED)
|
||||||
|
|
Loading…
Reference in New Issue