pthread_mutexattr_getprotocol: modify prototype

modify the return value according to posix standard

Change-Id: I6e32a8f7a5cac85fe7a395a8115710fdff61d985
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
This commit is contained in:
dongjiuzhu 2020-12-01 10:41:49 +08:00 committed by Abdelatif Guettouche
parent 350a8b31a8
commit 9315fe21ed
1 changed files with 4 additions and 2 deletions

View File

@ -70,9 +70,11 @@ int pthread_mutexattr_getprotocol(FAR const pthread_mutexattr_t *attr,
#ifdef CONFIG_PRIORITY_INHERITANCE #ifdef CONFIG_PRIORITY_INHERITANCE
linfo("Returning %d\n", attr->proto); linfo("Returning %d\n", attr->proto);
return attr->proto; *protocol = attr->proto;
#else #else
linfo("Returning %d\n", PTHREAD_PRIO_NONE); linfo("Returning %d\n", PTHREAD_PRIO_NONE);
return PTHREAD_PRIO_NONE; *protocol = PTHREAD_PRIO_NONE;
#endif #endif
return 0;
} }