mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 20:08:15 +08:00
pthread: restore pthread mutex default protocol POSIX compatibility
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
committed by
Xiang Xiao
parent
5a0ab205ca
commit
2447b7bd9a
@@ -63,8 +63,12 @@ int pthread_mutexattr_init(FAR pthread_mutexattr_t *attr)
|
||||
attr->pshared = 0;
|
||||
|
||||
#ifdef CONFIG_PRIORITY_INHERITANCE
|
||||
attr->proto = SEM_PRIO_INHERIT;
|
||||
#endif
|
||||
# ifdef PTHREAD_MUTEX_DEFAULT_PRIO_INHERIT
|
||||
attr->proto = PTHREAD_PRIO_INHERIT;
|
||||
# else
|
||||
attr->proto = PTHREAD_PRIO_NONE;
|
||||
# endif
|
||||
#endif /* CONFIG_PRIORITY_INHERITANCE */
|
||||
|
||||
#ifdef CONFIG_PTHREAD_MUTEX_TYPES
|
||||
attr->type = PTHREAD_MUTEX_DEFAULT;
|
||||
|
||||
Reference in New Issue
Block a user