If i understood the implementation correct, rtf_get returns the number of bytes it
reads .
so this little fix should do the job :
--------------------------------------------
n=rtf_get(FIFO1, &TestSample, sizeof(TestSample));
if(n>0){
TestSample.r=TestSample.a*TestSample.b;
rtf_put(FIFO2, &TestSample, sizeof(TestSample));
/* All values are o.k. */
printk("Task %i: a=%i, b=%i, u=%i, r=%i\n", t,
(int)TestSample.a,
(int)TestSample.b,
(int)TestSample.u,
(int)TestSample.r);
}
--------------------------------------------
( I haven't tested it, I'm just guessing ... :-) )
Oliver
--
------------------------------------------------------------------------
Dipl.Ing (BA) Oliver Schindler
------------------------------------------------------------------------
Every program has at least one bug and can be shortened by at least one
instruction -- from which, by induction, one can deduce that every
program can be reduced to one instruction which doesn't work.
By unknown
------------------------------------------------------------------------
--- [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/