patacongo commented on pull request #2497: URL: https://github.com/apache/incubator-nuttx/pull/2497#issuecomment-740786752
> Note that there are other places in the OS that use similar loop than here, consider fs/aio/aio_initialize.c: aioc_free() function, which calls aio_lock(), which calls nxsem_wait_uninterruptible() internally. Maybe some future commit will change all these to nxsem_wait_noncancelable()? Except that aio_lock() has additional logic for recursive locking -> not immediately obvious how to refactor it. I am not sure if it is a problem if a function does return ECANCELED or not. Certainly the task has a pending cancellation in that case and is probably wise to shut down (but not necessary). Applications in general never test for ECANCELED and never take any special action on that error; cancellation is handled completely "behind the scenses" by calls to cancellation points. I think returning the error is optional but not necessary. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org