include/threads: Fix pthread_mutexattr_t initialization on mtx_init

pthread_attr_init was being erroneously called for initializing an
instance of pthread_mutexattr_t.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
This commit is contained in:
Gustavo Henrique Nihei 2021-08-30 18:22:51 -03:00 committed by Xiang Xiao
parent 270e9196c6
commit 558b772146
1 changed files with 1 additions and 1 deletions

View File

@ -183,7 +183,7 @@ static inline int mtx_init(FAR mtx_t *mutex, int type)
if (type & mtx_recursive)
{
pthread_attr_init(&attr);
pthread_mutexattr_init(&attr);
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
pattr = &attr;
}