fjpanag edited a comment on pull request #5266:
URL: https://github.com/apache/incubator-nuttx/pull/5266#issuecomment-1016259419


   @GUIDINGLI as mentioned 
[here](https://github.com/apache/incubator-nuttx/commit/9a53601ba993d43684328dcae8750acb00a34cc7#commitcomment-64151785),
 removing the check does not solve the issue.
   
   There is already a way to disable this check, through Kconfig.
   
   The fix (even if temporary) should aim in having this check working 
specifically when priority inheritance is enabled.
   
   ---
   
   My thought for a temporal fix would be something like this:
   ```
   // sched/sched_setpriority.c line 336
   
   if ((sched_priority < SCHED_PRIORITY_MIN ||
       sched_priority > SCHED_PRIORITY_MAX) &&
       !(sched_priority == 0 && tcb->pid == 0 )
     {
       return -EINVAL;
     }
   ```
   


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