sched/pthread: Set the protocol of underlying semaphore to SEM_TYPE_MUTEX in pthread_mutex_init
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
This commit is contained in:
parent
32c5667d5d
commit
cd84da8714
1 changed files with 2 additions and 1 deletions
|
|
@ -92,7 +92,8 @@ int pthread_mutex_init(FAR pthread_mutex_t *mutex,
|
|||
#if defined(CONFIG_PRIORITY_INHERITANCE) || defined(CONFIG_PRIORITY_PROTECT)
|
||||
if (attr)
|
||||
{
|
||||
status = mutex_set_protocol(&mutex->mutex, attr->proto);
|
||||
status = mutex_set_protocol(&mutex->mutex,
|
||||
SEM_TYPE_MUTEX | attr->proto);
|
||||
if (status < 0)
|
||||
{
|
||||
mutex_destroy(&mutex->mutex);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue