Subject: [arm-gnu] Problems with pthread on ARM/PXA270

From: [email-masked] (Jamie Lokier)
Date: Fri, 18 Sep 2009 13:48:48 +0100

Uwe Kleine-K?nig wrote:
> On Thu, Sep 17, 2009 at 08:54:44AM +1000, James wrote:
> > Are you running with superuser privileges?  My manpage tells me that
> > SCHED_RR is only available if run with superuser privileges.
> Note that pthread_attr_setschedpolicy has a return value that tells you
> if the function was successful.

And that SCHED_RR has a time quantum returned by sched_rr_get_interval
which is not guaranteed to be small.  However, if it is a small time
and it's not switching that's a bug in either libc or the kernel.

Note that printf() does locking which may complicate things.  Try
opening separate outputs for each thread, or using write().

-- Jamie