pussuw commented on code in PR #14596:
URL: https://github.com/apache/nuttx/pull/14596#discussion_r1825793404
##########
arch/arm/src/arm/arm_syscall.c:
##########
@@ -54,19 +54,23 @@
uint32_t *arm_syscall(uint32_t *regs)
{
- struct tcb_s *tcb = this_task();
+ struct tcb_s **running_task = &g_running_tasks[this_cpu()];
+ FAR struct tcb_s *tcb = this_task();
uint32_t cmd;
- int cpu;
/* Nested interrupts are not supported */
DEBUGASSERT(up_current_regs() == NULL);
+ if (*running_task != NULL)
+ {
+ (*running_task)->xcp.regs = regs;
Review Comment:
So this is a result of how we do the context switch via invoking a trap; the
task that is being switched out is in "running_task" and the task that will run
next is in "this_task()" ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]