Re: Thread Scheduler Priority

From: Adrian Chadd <adrian_at_freebsd.org>
Date: Wed, 28 May 2014 22:17:37 -0700
are you doing this all as root?


-a


On 28 May 2014 22:12, Fred Pedrisa <fredhps10_at_hotmail.com> wrote:
> 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, &param[gnThreadID]) != 0)
>
>                                                {
>
>                                                                error
> ("Unable to get priority");
>
>                                                                return 1;
>
>                                                }
>
>
> param[gnThreadID].sched_priority = 99;
>
>                                                if
> (pthread_setschedparam(ts[gnThreadID], police, &param[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 ?
>
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
Received on Thu May 29 2014 - 03:17:38 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:49 UTC