pussuw commented on code in PR #16194:
URL: https://github.com/apache/nuttx/pull/16194#discussion_r2059009780
##########
sched/semaphore/sem_destroy.c:
##########
@@ -61,6 +61,9 @@
int nxsem_destroy(FAR sem_t *sem)
{
int32_t old;
+ const bool mutex = NXSEM_IS_MUTEX(sem);
+ FAR atomic_t * const plock = mutex ? NXSEM_MHOLDER(sem) : NXSEM_COUNT(sem);
Review Comment:
For me it renders as `FAR atomic_t * const` (notice the extra whitespace)
##########
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:
Fair enough!
--
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]