mirror of
https://github.com/apache/nuttx.git
synced 2026-05-24 07:46:16 +08:00
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:
committed by
Xiang Xiao
parent
32c5667d5d
commit
cd84da8714
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user