yamt commented on code in PR #15324: URL: https://github.com/apache/nuttx/pull/15324#discussion_r1897025330
########## sched/clock/clock_gettime.c: ########## @@ -58,15 +58,15 @@ static clock_t clock_process_runtime(FAR struct tcb_s *tcb) group = tcb->group; - flags = spin_lock_irqsave(NULL); + flags = spin_lock_irqsave(&group->lock); sq_for_every(&group->tg_members, curr) { tcb = container_of(curr, struct tcb_s, member); runtime += tcb->run_time; } - spin_unlock_irqrestore(NULL, flags); + spin_unlock_irqrestore(&group->lock, flags); Review Comment: are you really sure it improves performance? have you measured? otherwise, my gut feeling is that it's safer to avoid going too further into the "finer-grained lock is always better" assumption at this point. -- 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: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org