On Thu, Sep 23, 2010 at 12:17:54PM +0100, Stuart Henderson wrote:
> On 2010/09/23 12:06, Edd Barrett wrote:
> > On Thu, Sep 23, 2010 at 11:40:38AM +0100, Stuart Henderson wrote:
> > > we have support for thread priorities, see src/lib/libpthread/uthread/
> > > and pthreads(3), just not the sched_get_priority_*() functions.
> > 
> > Good, thanks for clarifying.
> > 
> > > it might make sense to add them though, we have patches in a few
> > > ports for this:
> > 
> > Adding this function would be the correct fix. These patches appear to
> > just workaround the real issue.
> > 
> > Is there any harm in also adding MAX/MIN to the pthread header? This will 
> > allow
> > us to rid of magic numbers until the function becomes available.
> 
> I don't see the point in that, it just means swapping one patch
> for another. If anything is added it should be the standard system
> calls so the patches can just be removed.
> 
> http://www.opengroup.org/onlinepubs/000095399/functions/sched_get_priority_max.html

  Agreed. We probably want to remove PTHREAD_(MIN|MAX)_PRIORITY from the
pthread_schedparam(3) too.
 
> I see we do already have implementations for linux emulation, see
> /sys/compat/linux/linux_sched.c, which returns 0 for both min and max.

  This is different, though. We don't support process scheduling, only
pthreads scheduling.

  f.-

Reply via email to