开发者

Unable to set thread priority using pthread_setschedparam() in openSuse 11.4 - 2.6.37 (only!)

开发者 https://www.devze.com 2023-04-13 09:15 出处:网络
I am running an application that works fine on openSuse 11.3 and on 11.4 with the 2.6.39 kernel.But on 11.4 with the stock 2.6.37 kernel, it gives me an error.

I am running an application that works fine on openSuse 11.3 and on 11.4 with the 2.6.39 kernel. But on 11.4 with the stock 2.6.37 kernel, it gives me an error.

This application creates a thread and then attempts to set the priority. When executing pthread_setschedparam( ) it returns 1, which is EPERM (not permitted). I am logged in as root when this happens.

I've tried setting some of the values in /etc/security/limits.conf file, but it still didn't work. I also didn't understand why I would have to if I was logged in as root.

I looked at the kernel changes from 2.6.34 to .39, and there were some mentions on scheduling, but I didn't see any smoking g开发者_如何转开发un there.

Any help is appreciated. Thanks.


Turns out something in the patches fixes it. If you do a "zypper patch" and let it patch to 2.6.37.6-0.7, then it works fine.

0

精彩评论

暂无评论...
验证码 换一张
取 消