anchao commented on code in PR #17955:
URL: https://github.com/apache/nuttx/pull/17955#discussion_r2706258692
##########
sched/addrenv/addrenv.c:
##########
@@ -217,7 +218,7 @@ FAR struct addrenv_s *addrenv_allocate(void)
{
/* Take reference so this won't get freed */
- addrenv->refs = 1;
+ atomic_set(&addrenv->refs, 1);
Review Comment:
So this instance has just been allocated, right? Why is an atomic operation
required?
--
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]