mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
arch/arm: armv8-r irq type-safe bit ops
Use 1u/~1u constants for TPIDRPRW bit operations. Avoid implicit conversion to a different underlying type (MISRA Rule 10.3). No functional change to task pointer tagging logic. Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
This commit is contained in:
parent
a7b7630fd3
commit
ef6278b0ff
1 changed files with 4 additions and 4 deletions
|
|
@ -483,12 +483,12 @@ static inline_function uintptr_t up_getusrsp(void *regs)
|
|||
noinstrument_function
|
||||
static inline_function void up_set_interrupt_context(bool flag)
|
||||
{
|
||||
CP15_MODIFY(flag, 1ul, TPIDRPRW);
|
||||
CP15_MODIFY(flag, 1u, TPIDRPRW);
|
||||
}
|
||||
|
||||
#define up_this_task() ((struct tcb_s *)(CP15_GET(TPIDRPRW) & ~1ul))
|
||||
#define up_update_task(t) CP15_MODIFY(t, ~1ul, TPIDRPRW)
|
||||
#define up_interrupt_context() (CP15_GET(TPIDRPRW) & 1)
|
||||
#define up_this_task() ((struct tcb_s *)(CP15_GET(TPIDRPRW) & ~1u))
|
||||
#define up_update_task(t) CP15_MODIFY(t, ~1u, TPIDRPRW)
|
||||
#define up_interrupt_context() (CP15_GET(TPIDRPRW) & 1u)
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue