scheduler time base

Christian Salbeck salbox at
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) {
		} else {

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  


More information about the Rtai mailing list