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:
parent
270e9196c6
commit
558b772146
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue