Re: 2.6.X, NPTL, SCHED_FIFO and JACK

Ulrich Drepper
2004-06-30T17:20:57Z

Paul Davis wrote:

> this has me thinking. one of the major changes with NPTL is that all
> threads share the same PID. so how in the world do we ever set the
> scheduling policy of a single thread (as opposed to something
> identified by a pid_t) to SCHED_FIFO?

If you have to ask this question than it's no wonder you get erratic
behavior. It means you haven't looked at the pthread interface at all.

Define a pthread_attr_t with the appropriate setting (with
pthread_attr_setschedparam etc) and create the thread (and use
pthread_attr_setinheritsched correctly). Alternatively use
pthread_setschedparam on already running threads.

And use a recent enough nptl version. Very early versions didn't have
any of the scheduler handling implemented.

--
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖