mailing list of musl libc
 help / color / mirror / code / Atom feed
* Plan to implement pthread_mutexattr_setprotocol(PRIO_INHERIT)
@ 2019-02-10  8:32 Johann Hanne
  2019-02-10 14:52 ` Rich Felker
  0 siblings, 1 reply; 2+ messages in thread
From: Johann Hanne @ 2019-02-10  8:32 UTC (permalink / raw)
  To: musl

Hi,

are there any plans for an implementation of 
pthread_mutexattr_setprotocol(PRIO_INHERIT)?

Am I missing an alternative? My intention is to temporarily boost the 
priority of a lower-prio thread in case it is holding a mutex which 
prevents a higher-prio thread from running.

Cheers,
   Johann



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Plan to implement pthread_mutexattr_setprotocol(PRIO_INHERIT)
  2019-02-10  8:32 Plan to implement pthread_mutexattr_setprotocol(PRIO_INHERIT) Johann Hanne
@ 2019-02-10 14:52 ` Rich Felker
  0 siblings, 0 replies; 2+ messages in thread
From: Rich Felker @ 2019-02-10 14:52 UTC (permalink / raw)
  To: Johann Hanne; +Cc: musl

On Sun, Feb 10, 2019 at 09:32:29AM +0100, Johann Hanne wrote:
> are there any plans for an implementation of
> pthread_mutexattr_setprotocol(PRIO_INHERIT)?
> 
> Am I missing an alternative? My intention is to temporarily boost
> the priority of a lower-prio thread in case it is holding a mutex
> which prevents a higher-prio thread from running.

There aren't plans in the sense of a schedule for it happening, but
the intent is that this feature eventually be supported. If there's
something you need it for we can discuss getting it done.

Priority protection (PRIO_PROTECT) on the other hand I'm not so sure
about. Due to lack of any support on the kernel side, the approach
glibc uses for it requires some really fragile memorization and
changing/restoring of thread priorities from userspace. I think it
would need a stronger motivation to overcome reasons for not doing it.

Rich


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-02-10 14:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-10  8:32 Plan to implement pthread_mutexattr_setprotocol(PRIO_INHERIT) Johann Hanne
2019-02-10 14:52 ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).