This is an automated email from the ASF dual-hosted git repository. pkarashchenko 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 fb852440af pthread: fix typo with CONFIG_PTHREAD_MUTEX_DEFAULT_PRIO_INHERIT fb852440af is described below commit fb852440af07e9fd33cda7e6c161f71487d53ae0 Author: Juha Niskanen <juha.niska...@haltian.com> AuthorDate: Mon Sep 5 14:16:41 2022 +0300 pthread: fix typo with CONFIG_PTHREAD_MUTEX_DEFAULT_PRIO_INHERIT Signed-off-by: Juha Niskanen <juha.niska...@haltian.com> --- libs/libc/pthread/pthread_mutexattr_init.c | 4 +--- sched/pthread/pthread_mutexinit.c | 9 ++++----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/libs/libc/pthread/pthread_mutexattr_init.c b/libs/libc/pthread/pthread_mutexattr_init.c index d04d5c52e4..fda92d93a1 100644 --- a/libs/libc/pthread/pthread_mutexattr_init.c +++ b/libs/libc/pthread/pthread_mutexattr_init.c @@ -44,8 +44,6 @@ * Returned Value: * 0 if successful. Otherwise, an error code. * - * Assumptions: - * ****************************************************************************/ int pthread_mutexattr_init(FAR pthread_mutexattr_t *attr) @@ -63,7 +61,7 @@ int pthread_mutexattr_init(FAR pthread_mutexattr_t *attr) attr->pshared = 0; #ifdef CONFIG_PRIORITY_INHERITANCE -# ifdef PTHREAD_MUTEX_DEFAULT_PRIO_INHERIT +# ifdef CONFIG_PTHREAD_MUTEX_DEFAULT_PRIO_INHERIT attr->proto = PTHREAD_PRIO_INHERIT; # else attr->proto = PTHREAD_PRIO_NONE; diff --git a/sched/pthread/pthread_mutexinit.c b/sched/pthread/pthread_mutexinit.c index a5bd11d420..0e4b5f1008 100644 --- a/sched/pthread/pthread_mutexinit.c +++ b/sched/pthread/pthread_mutexinit.c @@ -44,12 +44,11 @@ * Create a mutex * * Input Parameters: - * None + * mutex - A reference to the mutex to be initialized + * attr - Mutex attribute object to be used * * Returned Value: - * None - * - * Assumptions: + * 0 if successful. Otherwise, an error code. * ****************************************************************************/ @@ -61,7 +60,7 @@ int pthread_mutex_init(FAR pthread_mutex_t *mutex, uint8_t type = PTHREAD_MUTEX_DEFAULT; #endif #ifdef CONFIG_PRIORITY_INHERITANCE -# ifdef PTHREAD_MUTEX_DEFAULT_PRIO_INHERIT +# ifdef CONFIG_PTHREAD_MUTEX_DEFAULT_PRIO_INHERIT uint8_t proto = PTHREAD_PRIO_INHERIT; # else uint8_t proto = PTHREAD_PRIO_NONE;