arch/tricore: remove redundant and misleading pointer usage in tricore_doirq()
'struct tcb_s **running_task = &g_running_tasks[this_cpu()];'
was updated to
'struct tcb_s *running_task = g_running_tasks[this_cpu()];'
'if (*running_task != NULL)
{
( *running_task)->xcp.regs = regs;
}'
was updated to
'if (running_task != NULL)
{
running_task->xcp.regs = regs;
}'
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
This commit is contained in:
parent
ed751889de
commit
627729635b
1 changed files with 5 additions and 5 deletions
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
IFX_INTERRUPT_INTERNAL(tricore_doirq, 0, 255)
|
||||
{
|
||||
struct tcb_s **running_task = &g_running_tasks[this_cpu()];
|
||||
struct tcb_s *running_task = g_running_tasks[this_cpu()];
|
||||
struct tcb_s *tcb;
|
||||
|
||||
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
||||
|
|
@ -58,9 +58,9 @@ IFX_INTERRUPT_INTERNAL(tricore_doirq, 0, 255)
|
|||
icr.U = __mfcr(CPU_ICR);
|
||||
regs = (uintptr_t *)__mfcr(CPU_PCXI);
|
||||
|
||||
if (*running_task != NULL)
|
||||
if (running_task != NULL)
|
||||
{
|
||||
(*running_task)->xcp.regs = regs;
|
||||
running_task->xcp.regs = regs;
|
||||
}
|
||||
|
||||
board_autoled_on(LED_INIRQ);
|
||||
|
|
@ -117,11 +117,11 @@ IFX_INTERRUPT_INTERNAL(tricore_doirq, 0, 255)
|
|||
|
||||
up_set_current_regs(NULL);
|
||||
|
||||
/* (*running_task)->xcp.regs is about to become invalid
|
||||
/* running_task->xcp.regs is about to become invalid
|
||||
* and will be marked as NULL to avoid misusage.
|
||||
*/
|
||||
|
||||
(*running_task)->xcp.regs = NULL;
|
||||
running_task->xcp.regs = NULL;
|
||||
board_autoled_off(LED_INIRQ);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue