Hi,

 

While using MUSL C-library 1.1.22. we observed an issue with the pthread_mutexattr_getprotocol() implementation. The same implementation is in the latest version also.

When the priority inheritance mutexes were implemented, it seems that pthread_mutexattr_getprotocol() wasn’t updated to return the proper mutex protocol type.

 

The PI mutexes update was done in this commit: http://git.musl-libc.org/cgit/musl/commit/?id=54ca677983d47529bab8752315ac1a2b49888870

 

If possible, maybe the get protocol function can be updated in a future merge.

 

In order to fix the get protocol function, we changed it to:

int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *restrict a, int *restrict protocol)

{

   if (a->__attr & 8)

               *protocol = PTHREAD_PRIO_INHERIT;

   else

               *protocol = PTHREAD_PRIO_NONE;

               return 0;

}

 

Best Regards,

Bogdan Nistor

Software Engineer
Enterprise Business Unit

Email

Bogdan.Nistor@enea.com

Phone

+40 74 517 5795


Enea
319 Splaiul Independentei
OB403A District 6
Bucharest 060044, ROMANIA

 

 

 


This message, including attachments, is CONFIDENTIAL. It may also be privileged or otherwise protected by law. If you received this email by mistake please let us know by reply and then delete it from your system; you should not copy it or disclose its contents to anyone. All messages sent to and from Enea may be monitored to ensure compliance with internal policies and to protect our business. Emails are not secure and cannot be guaranteed to be error free as they can be intercepted, a mended, lost or destroyed, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of email transmission. Anyone who communicates with us by email accepts these risks.