MISRA-related fixes.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14543 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
Giovanni Di Sirio 2021-06-13 09:25:32 +00:00
parent 1fabd5fc17
commit bf475d92c6
5 changed files with 12 additions and 9 deletions

View File

@ -22,3 +22,6 @@
--- Module: ..\..\..\os\oslib\src\chdelegates.c (C) --- Module: ..\..\..\os\oslib\src\chdelegates.c (C)
--- Module: ..\..\..\os\oslib\src\chfactory.c (C) --- Module: ..\..\..\os\oslib\src\chfactory.c (C)
executed 6-13-2021

View File

@ -375,7 +375,7 @@ struct port_context {
(tp)->ctx.sp->r4 = (uint32_t)(pf); \ (tp)->ctx.sp->r4 = (uint32_t)(pf); \
(tp)->ctx.sp->r5 = (uint32_t)(arg); \ (tp)->ctx.sp->r5 = (uint32_t)(arg); \
(tp)->ctx.sp->lr = (uint32_t)__port_thread_start; \ (tp)->ctx.sp->lr = (uint32_t)__port_thread_start; \
} while (0) } while (false)
/** /**
* @brief Computes the thread working area global size. * @brief Computes the thread working area global size.
@ -460,7 +460,7 @@ struct port_context {
chSysHalt("stack overflow"); \ chSysHalt("stack overflow"); \
} \ } \
__port_switch(ntp, otp); \ __port_switch(ntp, otp); \
} while (0) } while (false)
#endif #endif
/** /**

View File

@ -334,7 +334,7 @@ struct port_context {
(tp)->ctx.sp->r4 = (uint32_t)(pf); \ (tp)->ctx.sp->r4 = (uint32_t)(pf); \
(tp)->ctx.sp->r5 = (uint32_t)(arg); \ (tp)->ctx.sp->r5 = (uint32_t)(arg); \
(tp)->ctx.sp->lr = (uint32_t)__port_thread_start; \ (tp)->ctx.sp->lr = (uint32_t)__port_thread_start; \
} while (0) } while (false)
/** /**
* @brief Computes the thread working area global size. * @brief Computes the thread working area global size.
@ -419,7 +419,7 @@ struct port_context {
chSysHalt("stack overflow"); \ chSysHalt("stack overflow"); \
} \ } \
__port_switch(ntp, otp); \ __port_switch(ntp, otp); \
} while (0) } while (false)
#endif #endif
/*===========================================================================*/ /*===========================================================================*/

View File

@ -604,7 +604,7 @@ struct port_context {
(tp)->ctx.sp->lr = (uint32_t)__port_thread_start; \ (tp)->ctx.sp->lr = (uint32_t)__port_thread_start; \
__PORT_SETUP_CONTEXT_MPU(tp); \ __PORT_SETUP_CONTEXT_MPU(tp); \
__PORT_SETUP_CONTEXT_SYSCALL(tp, wtop); \ __PORT_SETUP_CONTEXT_SYSCALL(tp, wtop); \
} while (0) } while (false)
/** /**
* @brief Context switch area size. * @brief Context switch area size.
@ -703,7 +703,7 @@ struct port_context {
chSysHalt("stack overflow"); \ chSysHalt("stack overflow"); \
} \ } \
__port_switch(ntp, otp); \ __port_switch(ntp, otp); \
} while (0) } while (false)
#else #else
#define port_switch(ntp, otp) do { \ #define port_switch(ntp, otp) do { \
@ -712,7 +712,7 @@ struct port_context {
/* Setting up the guard page for the switched-in thread.*/ \ /* Setting up the guard page for the switched-in thread.*/ \
mpuSetRegionAddress(PORT_USE_GUARD_MPU_REGION, \ mpuSetRegionAddress(PORT_USE_GUARD_MPU_REGION, \
chThdGetSelfX()->wabase); \ chThdGetSelfX()->wabase); \
} while (0) } while (false)
#endif #endif
#endif #endif

View File

@ -435,7 +435,7 @@ struct port_context {
PORT_SETUP_CONTEXT_SPLIM(tp, wbase); \ PORT_SETUP_CONTEXT_SPLIM(tp, wbase); \
PORT_SETUP_CONTEXT_FPU(tp); \ PORT_SETUP_CONTEXT_FPU(tp); \
PORT_SETUP_CONTEXT_MPU(tp); \ PORT_SETUP_CONTEXT_MPU(tp); \
} while (0) } while (false)
/** /**
* @brief Computes the thread working area global size. * @brief Computes the thread working area global size.
@ -515,7 +515,7 @@ struct port_context {
chSysHalt("stack overflow"); \ chSysHalt("stack overflow"); \
} \ } \
__port_switch(ntp, otp); \ __port_switch(ntp, otp); \
} while (0) } while (false)
#endif #endif
/*===========================================================================*/ /*===========================================================================*/