EINVAL when SCHED_OTHER thread tries to hold PTHREAD_PRIO_PROTECT mutex

Carlos O'Donell carlos@codesourcery.com
Mon Mar 31 20:43:00 GMT 2008


Sripathi Kodi wrote:
> I need to know whether pthread_mutex_lock returning EINVAL is an 
> acceptable behavior in this circumstance. Manpages/POSIX are not very 
> clear about this.

POSIX says "The scheduling parameters for the SCHED_OTHER policy are 
implementation-defined," and the Linux Kernel says "SCHED_OTHER may have 
only priority 0," thus *any* call which attempts to change your threads 
priority will fail.

I think this behaviour is acceptable.

Cheers,
Carlos.
-- 
Carlos O'Donell
CodeSourcery
carlos@codesourcery.com
(650) 331-3385 x716



More information about the Libc-alpha mailing list