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