Hi Petro,

According with OpenGroup there is not ECANCELED as possible return:

https://pubs.opengroup.org/onlinepubs/7908799/xsh/sem_wait.html

Maybe it should be replaced with EINTR case it was cancelled because
was interrupted by a signal.

BR,

Alan

On 5/26/22, Petro Karashchenko <petro.karashche...@gmail.com> wrote:
> Hi,
>
> I have a question about sem_wait. Current implementation in NuttX can
> return failure and set errno to ECANCELED in case if the semaphore wait is
> done while code is inside the cancelation point. However I do not see
> ECANCELED in the POSIX description of sem_wait. Can anyone bring some more
> light on why the NuttX version of sem_wait violates POSIX?
>
> Best regards,
> Petro
>

Reply via email to