RE: Unable set the priority for a pthread through pthread_setschedparam

"Srinivas G." <[email protected]>
Newsgroups org.kernel.vger.linux-c-programming
Message-ID <F5BA82141F7AA94885B9643C77EEA5F2103CF8@mail.esntechnologies.co.in>
Glynn Clements wrote:

> Yes, subject to certain restrictions, which are detailed in the
> sched_setscheduler(2) manpage.
> 
> In particular, a non-privileged process cannot set the real-time
> priority higher than its RLIMIT_RTPRIO setting. You can change this
> with an "rtprio" entry in /etc/security/limits.conf (settings are
> applied on login, so changes won't affect existing login sessions).
> 
> Privilege is determined by the CAP_SYS_NICE capability.

Thanks Glynn.

I have tried to set the RLIMIT_RTPRIO to 100 through
/etc/security/limits.conf. It was not defined previously, so I have
defined in the following way.

domain       type    item     value
#@srinivasg  soft    rtprio   100

After adding the above statement, I have restarted the system.

Then, I run my simple thread program. There is no luck. I got the same
error. I have posted the simple thread program in my first email.

What am I missing here? Please advice.

Thanks and Regards,
Srinivas G
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.