aboutsummaryrefslogtreecommitdiffstats
path: root/os/rt/include
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2015-03-07 09:25:13 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2015-03-07 09:25:13 +0000
commit57585301af1df353c3dd3a6e389d074bd4de4fcc (patch)
tree65fef57d39c7c14b73652de26b3653b528ee6450 /os/rt/include
parent4de725748239e122b27ff2b31aac32b835e8a2d6 (diff)
downloadChibiOS-57585301af1df353c3dd3a6e389d074bd4de4fcc.tar.gz
ChibiOS-57585301af1df353c3dd3a6e389d074bd4de4fcc.tar.bz2
ChibiOS-57585301af1df353c3dd3a6e389d074bd4de4fcc.zip
More MISRA.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7726 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/rt/include')
-rw-r--r--os/rt/include/chschd.h2
-rw-r--r--os/rt/include/chvt.h9
2 files changed, 8 insertions, 3 deletions
diff --git a/os/rt/include/chschd.h b/os/rt/include/chschd.h
index f57972a88..c106dd9b0 100644
--- a/os/rt/include/chschd.h
+++ b/os/rt/include/chschd.h
@@ -775,7 +775,7 @@ static inline void chSchPreemption(void) {
tprio_t p2 = currp->p_prio;
#if CH_CFG_TIME_QUANTUM > 0
- if (currp->p_preempt) {
+ if (currp->p_preempt > 0U) {
if (p1 > p2) {
chSchDoRescheduleAhead();
}
diff --git a/os/rt/include/chvt.h b/os/rt/include/chvt.h
index d461ccbfa..fe55fcc19 100644
--- a/os/rt/include/chvt.h
+++ b/os/rt/include/chvt.h
@@ -447,14 +447,19 @@ static inline void chVTDoTickI(void) {
#if CH_CFG_ST_TIMEDELTA == 0
ch.vtlist.vt_systime++;
+ /*lint -save -e9087 -e740 [11.3, 1.3] Cast required by list handling.*/
if (&ch.vtlist != (virtual_timers_list_t *)ch.vtlist.vt_next) {
+ /*lint -restore*/
virtual_timer_t *vtp;
--ch.vtlist.vt_next->vt_delta;
- while (!(vtp = ch.vtlist.vt_next)->vt_delta) {
+ vtp = ch.vtlist.vt_next;
+ while (vtp->vt_delta == 0U) {
vtfunc_t fn = vtp->vt_func;
- vtp->vt_func = (vtfunc_t)NULL;
+ vtp->vt_func = NULL;
+ /*lint -save -e9087 -e740 [11.3, 1.3] Cast required by list handling.*/
vtp->vt_next->vt_prev = (virtual_timer_t *)&ch.vtlist;
+ /*lint -restore*/
ch.vtlist.vt_next = vtp->vt_next;
chSysUnlockFromISR();
fn(vtp->vt_par);