scheduler time base

Christian Salbeck salbox at gmx.net
Thu Jun 30 16:57:59 CEST 2005


Hi rtai list,

I read that the UP-scheduler is based on the 8254 counter.  
[sched_overview.html / API doucmentation]
So on a UP machine, I can only use the UP-scheduler.
Why is the one-shot timer based on the cpu-frequency on a up-machine, then?

See following code:

RTIME period	= 1e9;

if (timer_mode) {
			rt_set_periodic_mode();
		} else {
			rt_set_oneshot_mode();
		}

period_count = start_rt_timer(nano2count(period));
printk(">>>>   %d\n", (int) period_count);



I set the timer mode to periodic mode and get 1193180 as a value. This is  
the 8254 clock frequency, this is alright!
If I set timer mode to one-shot, I get the value of my CPU-frequency!

I thought both, the periodic and the one-shot mode, are based on the 8254  
on a UP-machine...somehow, it doesn't look like that!

Can somebody, please, tell me how the scheduler get's it's time base on a  
UP-machine?
PLEASE,


thanx
Chris




More information about the Rtai mailing list