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/12/02 06:52:23 UTC
[incubator-nuttx] branch master updated:
pthread_mutexattr_getprotocol: modify prototype
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 9315fe2 pthread_mutexattr_getprotocol: modify prototype
9315fe2 is described below
commit 9315fe21ed58b6625fb5f52c443dd635adca8638
Author: dongjiuzhu <do...@xiaomi.com>
AuthorDate: Tue Dec 1 10:41:49 2020 +0800
pthread_mutexattr_getprotocol: modify prototype
modify the return value according to posix standard
Change-Id: I6e32a8f7a5cac85fe7a395a8115710fdff61d985
Signed-off-by: dongjiuzhu <do...@xiaomi.com>
---
libs/libc/pthread/pthread_mutexattr_getprotocol.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libs/libc/pthread/pthread_mutexattr_getprotocol.c b/libs/libc/pthread/pthread_mutexattr_getprotocol.c
index b48d54d..f252a38 100644
--- a/libs/libc/pthread/pthread_mutexattr_getprotocol.c
+++ b/libs/libc/pthread/pthread_mutexattr_getprotocol.c
@@ -70,9 +70,11 @@ int pthread_mutexattr_getprotocol(FAR const pthread_mutexattr_t *attr,
#ifdef CONFIG_PRIORITY_INHERITANCE
linfo("Returning %d\n", attr->proto);
- return attr->proto;
+ *protocol = attr->proto;
#else
linfo("Returning %d\n", PTHREAD_PRIO_NONE);
- return PTHREAD_PRIO_NONE;
+ *protocol = PTHREAD_PRIO_NONE;
#endif
+
+ return 0;
}