wangchdo commented on code in PR #16944:
URL: https://github.com/apache/nuttx/pull/16944#discussion_r2315336743


##########
sched/semaphore/sem_post.c:
##########
@@ -125,7 +125,11 @@ int nxsem_post_slow(FAR sem_t *sem)
       sem_count = atomic_read(NXSEM_COUNT(sem));
       do
         {
+#ifdef CONFIG_CUSTOM_SEMAPHORE_MAXVALUE
+          if (sem_count >= sem->maxvalue)
+#else
           if (sem_count >= SEM_VALUE_MAX)

Review Comment:
   Hi, I think there is no definition of CONFIG_SEM_VALUE_MAX ...
   
   CONFIG_CUSTOM_SEMAPHORE_MAXVALUE is added to let user to change the max 
allowed value during runtime.
   
   So different semaphore can have different max allowed value~



-- 
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]

Reply via email to