if pthread_mutexattr_setrobust_np is set, process will hang in multi process system. in glibc -2.5
Carlos O'Donell
carlos@systemhalted.org
Thu Apr 22 21:01:00 GMT 2010
On Thu, Apr 22, 2010 at 12:01 AM, guruswamy B <guru2018@gmail.com> wrote:
> Our is a platform application, we will give few libraries to the top
> layer application to use the services by our platform. Now to upgrade
> to new version of glibc and changes in the compiler is a problem. Also
> this pthread lock are in side the libraries we provide.
>
> Still i wonder, as i mentioned in my previous mail, why the robust
> flag started working once i set the protocol priority to
> PTHREAD_PRIO_INHERIT. will this affect normal working of my
> application.
Yes, of coarse it will, please review what PTHREAD_PRIO_INHERIT means:
http://www.opengroup.org/onlinepubs/009695399/functions/pthread_mutexattr_getprotocol.html
~~~
When a thread is blocking higher priority threads because of owning
one or more mutexes with the PTHREAD_PRIO_INHERIT protocol attribute,
it shall execute at the higher of its priority or the priority of the
highest priority thread waiting on any of the mutexes owned by this
thread and initialized with this protocol.
~~~
I don't know why it would start to work, but changing the protocol for
thread priorities will certainly change the timing, and perhaps avoid
whatever bug or error you have discovered.
Cheers,
Carlos.
More information about the Libc-help
mailing list