jlaitine commented on code in PR #16194:
URL: https://github.com/apache/nuttx/pull/16194#discussion_r2059002944
##########
sched/misc/deadlock.c:
##########
@@ -100,8 +100,8 @@ static void collect_deadlock(FAR struct tcb_s *tcb, FAR
void *arg)
pid_t holder;
size_t i;
- holder = mutex->holder;
- if (holder == NXMUTEX_NO_HOLDER)
+ holder = nxmutex_get_holder(mutex);
+ if (holder < 0)
Review Comment:
-1 is used in many places, like in pthread_mutex implementation, where there
is comparison if (holder < 0). Why change these all, as pid_t is signed and the
special value can be the same as before?
--
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]