Subject: Re: Is the pthread of netbsd support diffrent priority for
To: None <swcdyys@mail.sc.cninfo.net, tech-kern@netbsd.org>
From: Matthew Mondor <mm_lists@pulsar-zone.net>
List: tech-kern
Date: 01/13/2006 01:31:01
On Thu, 12 Jan 2006 16:57:10 +0800 (CST)
swcdyys@mail.sc.cninfo.net wrote:

> Hi,
>    Is the pthread of netbsd support diffrent priority for multitask in
>    one process?
>    I view the source code of pthread.c, the priority only priority 0.
>    If not, how to do?

Our pthread library indeed currently does not support alternate settings for
pthread_attr_(get|set)_schedpolicy(3) or
pthread_attr_(get|set)_schedparam(3).

There is, however sched_yield(3) which although unstandard could
potentially assist for cooperative threads behavior...

Of course, the process's priority can be altered which will affect the
whole process, but won't change the threading behavior within that same
process.

The POSIX real-time threads extensions are not yet implemented.  I am not
aware of an existing effort to work on these, unfortunately, although it
might be work in progress.

I would be interested to know myself if any plans exist to support these
extensions.  These require special signal delivery guarantees, if I
remember, which I'm not sure the kernel currently supports.

Matt

-- 
Note: Please only reply on the list, other mail is blocked by default.
Private messages from your address can be allowed by first asking.