Hi... On Sun, Jul 10, 2011 at is 17:27, loody <miloody@gmail.com> wrote:
Dear all: I have some questions about kthread: 1. can we change kthread priority through user mode program?
Theoritically you can, but only if the priority not fixed and/or you have required capability to do so
2. I found some functions that may be helpful. sched_getscheduler sched_setscheduler
When I use them in user mode, the return value of sched_setscheduler is fail.
did you do that as root? anything blocking you doing that withing SELinux or AppArmor policy?
there is a thread talking about this, http://www.spinics.net/lists/linux-rt-users/msg06588.html What makes me confuse is "these 2 functions is used in user mode or kernel mode?"
AFAIK they are user mode libc functions... -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com