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

xiaoxiang 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 9761235  libs/libc/semaphore/sem_getvalue: correct get_value 
descriptions
9761235 is described below

commit 9761235408dce11c673ea4fd602ea31be5e1abf0
Author: Oleg Evseev <ev.m...@gmail.com>
AuthorDate: Fri Jul 3 18:53:13 2020 +0300

    libs/libc/semaphore/sem_getvalue: correct get_value descriptions
    
    avoid possible confusion and follow the description POSIX.1-2017
    https://pubs.opengroup.org/onlinepubs/9699919799/functions/sem_getvalue.html
---
 libs/libc/semaphore/sem_getvalue.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libs/libc/semaphore/sem_getvalue.c 
b/libs/libc/semaphore/sem_getvalue.c
index 1f2799e..f232123 100644
--- a/libs/libc/semaphore/sem_getvalue.c
+++ b/libs/libc/semaphore/sem_getvalue.c
@@ -59,8 +59,8 @@
  *   but may not reflect the actual value of the semaphore when it is
  *   returned to the calling task.
  *
- *   If 'sem' is locked, the value return by nxsem_get_value() will either be
- *   zero or a negative number whose absolute value represents the number
+ *   If 'sem' is locked, then the object to which 'sval' points shall either
+ *   be zero or a negative number whose absolute value represents the number
  *   of tasks waiting for the semaphore.
  *
  * Input Parameters:
@@ -96,8 +96,8 @@ int nxsem_get_value(FAR sem_t *sem, FAR int *sval)
  *   but may not reflect the actual value of the semaphore when it is
  *   returned to the calling task.
  *
- *   If 'sem' is locked, the value return by sem_getvalue() will either be
- *   zero or a negative number whose absolute value represents the number
+ *   If 'sem' is locked, then the object to which 'sval' points shall either
+ *   be zero or a negative number whose absolute value represents the number
  *   of tasks waiting for the semaphore.
  *
  * Input Parameters:

Reply via email to