* How do I raise the priority of one thread in a multi-threaded process?
@ 2008-08-21 18:58 Alan Stern
2008-08-21 20:28 ` Michal Hocko
0 siblings, 1 reply; 3+ messages in thread
From: Alan Stern @ 2008-08-21 18:58 UTC (permalink / raw)
To: Kernel development list
Can anyone tell me how to raise the priority of one thread in a
multi-threaded process (using the pthreads library)? Neither nice(2)
nor setpriority(2) is appropriate since they affect the priority of an
entire process rather than a single thread.
Thanks,
Alan Stern
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How do I raise the priority of one thread in a multi-threaded process?
2008-08-21 18:58 How do I raise the priority of one thread in a multi-threaded process? Alan Stern
@ 2008-08-21 20:28 ` Michal Hocko
2008-08-21 21:04 ` Alan Stern
0 siblings, 1 reply; 3+ messages in thread
From: Michal Hocko @ 2008-08-21 20:28 UTC (permalink / raw)
To: Alan Stern; +Cc: Kernel development list
On Thursday 21 August 2008 12:58:46 pm Alan Stern wrote:
> Can anyone tell me how to raise the priority of one thread in a
> multi-threaded process (using the pthreads library)? Neither nice(2)
> nor setpriority(2) is appropriate since they affect the priority of an
> entire process rather than a single thread.
Isn't pthread_setschedprio, what you are looking for?
>
> Thanks,
>
> Alan Stern
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Michal Hocko
L3 team
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9
Czech Republic
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How do I raise the priority of one thread in a multi-threaded process?
2008-08-21 20:28 ` Michal Hocko
@ 2008-08-21 21:04 ` Alan Stern
0 siblings, 0 replies; 3+ messages in thread
From: Alan Stern @ 2008-08-21 21:04 UTC (permalink / raw)
To: Michal Hocko; +Cc: Kernel development list
On Thu, 21 Aug 2008, Michal Hocko wrote:
> On Thursday 21 August 2008 12:58:46 pm Alan Stern wrote:
> > Can anyone tell me how to raise the priority of one thread in a
> > multi-threaded process (using the pthreads library)? Neither nice(2)
> > nor setpriority(2) is appropriate since they affect the priority of an
> > entire process rather than a single thread.
>
> Isn't pthread_setschedprio, what you are looking for?
Actually I was looking for pthread_setschedparam(). But it wasn't
clear at first that I needed to change the policy to SCHED_FIFO and
that special capabilities were needed. With those changes it seems to
work correctly.
Thanks for pointing me in the right direction!
Alan Stern
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-08-21 21:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-21 18:58 How do I raise the priority of one thread in a multi-threaded process? Alan Stern
2008-08-21 20:28 ` Michal Hocko
2008-08-21 21:04 ` Alan Stern
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®