I am writing an application with c++ and NetBeans on opensuse 11.4 with kernel 2.6.37.1-1.2 (logged in as root). This application creates a thread and when run gives this result:
sched_param param;
param.__sched_priority = -1;
policy = SCHED_FIFO;
param.__sched_priority = 50;
result = pthread_setschedparam(m_thread,policy,¶m);
result = 1(EPERM (not permitted))
Why?
erm... because it is not permitted? Check the following settings:
Something like this should go in the config file:
The given group will have a soft rtprio limit to 100. This will work, assuming your PAM configuration uses pam_limits.
You may have to make sure of the hard limit too: