You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2020/04/06 16:08:54 UTC

[incubator-nuttx] branch master updated: include/nuttx/semaphore.h: Add a NOTE to the uninterruptible wait functions.

This is an automated email from the ASF dual-hosted git repository.

aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new f9a7417  include/nuttx/semaphore.h:  Add a NOTE to the uninterruptible wait functions.
f9a7417 is described below

commit f9a7417be401680e33eabbfa9d3c42e427052693
Author: Gregory Nutt <gn...@nuttx.org>
AuthorDate: Mon Apr 6 09:39:49 2020 -0600

    include/nuttx/semaphore.h:  Add a NOTE to the uninterruptible wait functions.
---
 include/nuttx/semaphore.h | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/include/nuttx/semaphore.h b/include/nuttx/semaphore.h
index 33df1e0..03feb2c 100644
--- a/include/nuttx/semaphore.h
+++ b/include/nuttx/semaphore.h
@@ -526,6 +526,12 @@ int sem_setprotocol(FAR sem_t *sem, int protocol);
  *   EINVAL    - Invalid attempt to get the semaphore
  *   ECANCELED - May be returned if the thread is canceled while waiting.
  *
+ * NOTE:  It is essential that callers of this function handle the
+ * ECANCELED error.  Correct handling is that the function should return the
+ * error and the error should propagate back up the calling tree to the
+ * cancellation point interface function where the thread termination will
+ * be handled gracefully
+ *
  ****************************************************************************/
 
 int nxsem_wait_uninterruptible(FAR sem_t *sem);
@@ -551,6 +557,12 @@ int nxsem_wait_uninterruptible(FAR sem_t *sem);
  *   EDEADLK   A deadlock condition was detected.
  *   ECANCELED May be returned if the thread is canceled while waiting.
  *
+ * NOTE:  It is essential that callers of this function handle the
+ * ECANCELED error.  Correct handling is that the function should return the
+ * error and the error should propagate back up the calling tree to the
+ * cancellation point interface function where the thread termination will
+ * be handled gracefully
+ *
  ****************************************************************************/
 
 int nxsem_timedwait_uninterruptible(FAR sem_t *sem,
@@ -581,6 +593,12 @@ int nxsem_timedwait_uninterruptible(FAR sem_t *sem,
  *     -ETIMEDOUT is returned on the timeout condition.
  *     -ECANCELED may be returned if the thread is canceled while waiting.
  *
+ * NOTE:  It is essential that callers of this function handle the
+ * ECANCELED error.  Correct handling is that the function should return the
+ * error and the error should propagate back up the calling tree to the
+ * cancellation point interface function where the thread termination will
+ * be handled gracefully
+ *
  ****************************************************************************/
 
 int nxsem_tickwait_uninterruptible(FAR sem_t *sem, clock_t start,