arch: kernel_arch_func.h: Fix MISRA violation
Always compare unsigned interger type with another unsigned integer type. Currently in nios2, posix, riscv32, x86 and xtensa we were comparing the _kernel.nested variable with a signed interger type. Fixed this violation. Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
This commit is contained in:
parent
441d75770f
commit
e9cb0ae72a
5 changed files with 5 additions and 5 deletions
|
@ -46,7 +46,7 @@ static inline void _IntLibInit(void)
|
||||||
/* No special initialization of the interrupt subsystem required */
|
/* No special initialization of the interrupt subsystem required */
|
||||||
}
|
}
|
||||||
|
|
||||||
#define _is_in_isr() (_kernel.nested != 0)
|
#define _is_in_isr() (_kernel.nested != 0U)
|
||||||
|
|
||||||
#ifdef CONFIG_IRQ_OFFLOAD
|
#ifdef CONFIG_IRQ_OFFLOAD
|
||||||
void _irq_do_offload(void);
|
void _irq_do_offload(void);
|
||||||
|
|
|
@ -63,7 +63,7 @@ static inline void _IntLibInit(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define _is_in_isr() (_kernel.nested != 0)
|
#define _is_in_isr() (_kernel.nested != 0U)
|
||||||
|
|
||||||
#endif /* _ASMLANGUAGE */
|
#endif /* _ASMLANGUAGE */
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ FUNC_NORETURN void _NanoFatalErrorHandler(unsigned int reason,
|
||||||
const NANO_ESF *esf);
|
const NANO_ESF *esf);
|
||||||
|
|
||||||
|
|
||||||
#define _is_in_isr() (_kernel.nested != 0)
|
#define _is_in_isr() (_kernel.nested != 0U)
|
||||||
|
|
||||||
#ifdef CONFIG_IRQ_OFFLOAD
|
#ifdef CONFIG_IRQ_OFFLOAD
|
||||||
int _irq_do_offload(void);
|
int _irq_do_offload(void);
|
||||||
|
|
|
@ -142,7 +142,7 @@ extern FUNC_NORETURN void _x86_userspace_enter(k_thread_entry_t user_entry,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define _is_in_isr() (_kernel.nested != 0)
|
#define _is_in_isr() (_kernel.nested != 0U)
|
||||||
|
|
||||||
#endif /* _ASMLANGUAGE */
|
#endif /* _ASMLANGUAGE */
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,7 @@ static inline void _IntLibInit(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define _is_in_isr() (_arch_curr_cpu()->nested != 0)
|
#define _is_in_isr() (_arch_curr_cpu()->nested != 0U)
|
||||||
|
|
||||||
#endif /* _ASMLANGUAGE */
|
#endif /* _ASMLANGUAGE */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue