Zhigao Yao <[EMAIL PROTECTED]> writes:

> Dear all:
> I've been using RTLinux for a while and it's really cool. I just moved to
> RTL2.0 and got some problems with it. Seems to me, the parameter "period"
> in pthread_make_periodic_np() or rt_task_make_periodic() can be calculated
> like this: 1193180/frequency. Say, if I want to run a task at 1KHz, I
> should set "period" to 1193. This works fine in RTL1.x. I changed the
> hello.c(See below) a little bit to have it run for 10 seconds. But it only
> runs for about 8 seconds (from the time when I type "insmod hello.o" and
> hit ENTER to the time I saw "stops!" in the console).
> 
> Any ideas?
> 
> Best Regards
> Daniel

Hi,

First of all, in some of the examples, the 1193180 is called
RT_TICKS_PER_SEC. If this is really the number of ticks per second,
then 1193180 [s^-1]/frequency [s^-1] is the period in terms of the
number of ticks. So, I am not sure that you will get a 1kHz rate with
1000 ticks as the period; you actually need 1193 ticks as the result.

I am replying to this message just because I still have to figure out
why my periods work fine only up to about 850 ms. (I am aware of
potential overflow, but I think that even 1^9 is small enough to fit
in a long long). For larger values, it just does not work at all.

Aleks
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/

Reply via email to