Subject: [boost] boost threads: pthread mutex priority inheritance
From: Jason Newton (nevion_at_[hidden])
Date: 2011-07-27 19:48:42
I just discovered today that pthread mutex's aren't guaranteed to do
priority inheritance unless PTHREAD_PRIO_INHERIT is set. I'm doing a bunch
of soft-rt work with SCHED_RR so priority inheritance on shared resources is
a given necessity.
But how should this be worked into boost mutex? There's no way of
constructing a boost mutex from an existing object, nor anyway of setting
mutex attributes used inside the ctor. There's also no way of manipulating
the mutex attributes after pthread_mutex_init.
For the moment, the few lines that compose the mutex class are easily copied
so that I can do my own business inside the constructor but I expect others
will run into this problem down the line and this solution is a bit
unsavory. Any better advice?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk