pthread: restore pthread mutex default protocol POSIX compatibility

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
Petro Karashchenko
2022-01-06 11:02:13 +01:00
committed by Xiang Xiao
parent 5a0ab205ca
commit 2447b7bd9a
24 changed files with 63 additions and 22 deletions
+6 -2
View File
@@ -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;