Gang,

        I don't know what I was thinking, but I appear to be suffering from
severe brain fade.

        My simple example was using the same variable name for the task
structure as was another RT thread that was being run at 1kHz.  When I
loaded the new example, its task create wrote its data into the old task
variable and thus it got the interrupts destined for the old task.  Thus the
problem was entirely my fault.

        Why the hello example seemed to run fast as well is anybodies guess.
It appears to be working as expected now.

        I find it interesting that after browsing the scheduler source and
seeing that things should definitely work as I expected, I didn't bother to
recheck my own source.  I guess I am odd that way. :-)

        On the other hand, it *would* be nice if loading a module warns you
about overwriting existing kernel symbols or some such.  In fact, it would
be nice if each task got some defined way of establishing a prefix for
global variables so that they are not automatically overwriting one another.
The probability for one developer to inadvertently use the same name as
another is not a small one.  Perhaps the FSM Labs guys can comment on the
feasibility of this sort of thing.  There would need to be some sort of
function set available to do lookups in other processes namespaces as well,
so that intentional sharing can be done.  I am just trying to eliminate the
unintentional sharing.

        This would also be helpful for people who want to be able to run
multiple copies of the same RT task.  At the recent RTLinux conference in
Orlando I ran into a guy who was running engine simulations.  He wanted to
be able to run two copies of the same code at the same time and examine
variables in each.  Obviously if they are global variables (and they are),
he will need some sort of namespace architecture to make this work.  Has
anyone given this any thought?

Regards,

Steve


> -----Original Message-----
> From: Stephen D. Cohen 
> Sent: Thursday, December 07, 2000 11:07 AM
> To: '[EMAIL PROTECTED]'
> Cc: '[EMAIL PROTECTED]'
> Subject: Problems with Examples in RTLinux V3.0-pre9 
> 
> 
> Gang,
> 
>       OK, so I was having some problems getting a periodic 
> task to run with the right period.  So I went and browsed the 
> simplest of examples, hello.  It seems that I was doing 
> everything OK, but that neither hello nor my program end up 
> with the correct scheduling periodicity.
> 
>       For the sake of simplicity, let us focus on the hello 
> example, and I will assume that whatever fixes it will also 
> fix my code.  Can some one provide me with a working version 
> of the hello example?  The version distributed with the 
> release from FSM Labs simple repeats at an alarmingly high 
> rate, rather than the .5 second period specified in the call 
> to rtl_make_periodic_np.  I have exactly the same problem.
> 
>       I browsed rtl_sched.c and all seems to be as it should 
> be.  I have also had problems like this in the past, with 
> periodic tasks not going at the right rates.  I seem to 
> recall the there was a release note about this, but I can not 
> find it now.
> 
>       What is the deal gang?  Has anyone gotten the published 
> example to work correctly?  If a change was necessary, why 
> wasn't it incorporated into the published example?
> 
> Regards,
> 
> Steve
> 
> 
> ------------------------------------------
> Stephen D. Cohen, Engineering Manager
> Xybion Positioning Systems
> 11528 53rd Street North
> Clearwater, FLA  33760
> phone: (727) 299-0150, fax: (727) 299-0804
> ------------------------------------------
> 
> 
-- [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