|
Message-ID: <20201207223433.GI534@brightrain.aerifal.cx> Date: Mon, 7 Dec 2020 17:34:34 -0500 From: Rich Felker <dalias@...c.org> To: Bogdan Nistor <Bogdan.Nistor@...a.com> Cc: "musl@...ts.openwall.com" <musl@...ts.openwall.com> Subject: Re: pthread_mutexattr_getprotocol() issue On Mon, Dec 07, 2020 at 10:09:54AM +0000, Bogdan Nistor wrote: > 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; > } Thanks. I'm doing it just by moving the bit around since that's how the other similar functions are implemented now. Expect the fix to be included in the next release, which should appear in the next couple days. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.