mirror of
https://github.com/apache/nuttx.git
synced 2026-05-29 20:56:47 +08:00
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:
committed by
Xiang Xiao
parent
270e9196c6
commit
558b772146
+1
-1
@@ -183,7 +183,7 @@ static inline int mtx_init(FAR mtx_t *mutex, int type)
|
|||||||
|
|
||||||
if (type & mtx_recursive)
|
if (type & mtx_recursive)
|
||||||
{
|
{
|
||||||
pthread_attr_init(&attr);
|
pthread_mutexattr_init(&attr);
|
||||||
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
||||||
pattr = &attr;
|
pattr = &attr;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user