Date: Thu, 29 May 2014 02:12:59 -0300 From: Fred Pedrisa <fredhps10@hotmail.com> To: "'freebsd-current'" <freebsd-current@freebsd.org> Subject: Thread Scheduler Priority Message-ID: <COL131-DS40CDAE671F4A6060C9A85B0240@phx.gbl>
next in thread | raw e-mail | index | archive | help
Hi, Guys.
How can I adjust a certain thread to have the maximum system priority in the
scheduler ?
I've tried doing it this way :
/* Set thread priority. */
if
(pthread_getschedparam(ts[gnThreadID], &police, ¶m[gnThreadID]) != 0)
{
error
("Unable to get priority");
return 1;
}
param[gnThreadID].sched_priority = 99;
if
(pthread_setschedparam(ts[gnThreadID], police, ¶m[gnThreadID]) != 0)
{
error("Unable to set priority");
return 1;
}
However, in 'top', I don't see the process threads switching to -92
priority, like other threads in the system, is something I did wrong or
maybe I might be missing something ?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?COL131-DS40CDAE671F4A6060C9A85B0240>
