How do I change scheduling priorities? (2.6 kernel)
I am using FreeBSD on an ARM/XScale processor using 2.6 of the Linux kernel.
I have a C program that has a main thread and a callback function that is driven from a timer interupt. I looked into pthread_mutex but I don't like it for 2 reasons: it does not support recursion (not in Linux), but more importantly, will wait for the mutex to become available (not good in my case).
What I would like to do is up the priority of a small section of code to the highest level (time critical?) and return to the normal state shortly thereafter. Really what I want to implement is a critical section where no other processes or tasks can run. Does anyone know what calls I need to make? I can handle the recursion with some code once I get a handle on the task scheduling. Any code snips would be great.
Thanks!
Last edited by prcarp; 03-21-2006 at 04:32 AM.
|