anchao commented on code in PR #15522:
URL: https://github.com/apache/nuttx/pull/15522#discussion_r1914021556
##########
sched/misc/assert.c:
##########
@@ -836,10 +834,9 @@ void _assert(FAR const char *filename, int linenum,
reset_board(); /* Should not return. */
}
- flags = 0; /* suppress GCC warning */
if (os_ready)
{
- flags = spin_lock_irqsave(&g_assert_lock);
+ flags = enter_critical_section();
Review Comment:
flush call only needs to be done on one CPU after holding csec, and it does
not need to be process on all CPUs. and csec will save the assigned task
registers on each CPU and also save them in xcp->regs. I think it is not
necessary to do such a complicated operation as pausing the CPU.
--
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]