Re: [linux-audio-dev] thread priority question

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] thread priority question
From: Martijn Sipkema (msipkema_AT_sipkema-digital.com)
Date: Thu May 01 2003 - 02:43:44 EEST


> On Wed, Apr 30, 2003 at 11:20:40 -0500, Ben Loftis wrote:
> > Is there an equivalent to sched_setscheduler() that adjusts thread
priority instead of process priority? I want my audio thread to be higher
priority than my drawing thread. Both threads are part of the same app
(process). Is this possible in Linux v2.5?
>
> sched_setscheduler() works on threads too.

No, it does not. You need pthread_attr_setschedparam() to change
a thread's priority. Perhaps sched_setscheduler worked with
linuxthreads because it is not POSIX compliant since every thread
has a different pid, but with NPTL this is no longer the case.

--ms


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu May 01 2003 - 01:53:39 EEST