i m a relatively newbie to kernel-2.6.x. But i have
information that suggests that kernel-2.6.x has got
soft real-time capabilities.
So how-to write a simple program(may be a Hello world
program) which has real-time capabilities. I require
it for writing a program on kernel-2.6.x that uses the
soft real-time capabilities.
Any help in this matter will be highly appreciated.
Abhinav.
__________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html
Am Freitag, 16. April 2004 10:20 schrieb abhinav singh:
> i m a relatively newbie to kernel-2.6.x. But i have
> information that suggests that kernel-2.6.x has got
> soft real-time capabilities.
>
> So how-to write a simple program(may be a Hello world
> program) which has real-time capabilities. I require
> it for writing a program on kernel-2.6.x that uses the
> soft real-time capabilities.
Are you looking for http://www.rtai.org ?
Regards,
Axel
abhinav singh wrote:
> So how-to write a simple program(may be a Hello world
> program) which has real-time capabilities.
Something like the following will put you into one of the "realtime"
scheduling classes, and you will take priority over the normally
scheduled tasks.
struct sched_param p;
p.sched_priority=50;
if (sched_setscheduler(getpid(), SCHED_RR, &p) < 0) {
perror("error while setting scheduler class");
printf("continuing anyways, but results may not be as good\n");
}
The whole issue of soft-realtime is a complicated one, and there are
many other things that should be done to maximise predictability.
Chris