This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: EINVAL when SCHED_OTHER thread tries to hold PTHREAD_PRIO_PROTECT mutex


Sripathi Kodi wrote:
I have a program where a SCHED_OTHER thread tries to hold a pthread_mutex_t initialized with the PTHREAD_PRIO_PROTECT protocol. This fails with an EINVAL. Using strace/ltrace, I found that the sched_setscheduler, internally called by pthread_mutex_lock returns EINVAL, because it tries to set the priority of the thread to a value not permissible for SCHED_OTHER.

This is probably because the kernel doesn't allow SCHED_OTHER processes to have any priority other than 0? Have you tried using SCHED_RR?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]