>>>>> "Zennaro" == Zennaro Marco <[EMAIL PROTECTED]> writes:

 Zennaro> Hi! I have a problem (small one..). I have to generate a
 Zennaro> random number in a RTLinux module. I cannot use rand(). How
 Zennaro> can I generate the number? 

Why not use rand()?

I assume you mean pseudo-random...  You could just lift one of the
generators from Knuth volume 2.  For example:

static unsigned long seed = 1;

unsigned long ulrand (void)
{
   return (seed *= 69069);
}

        paul
--- [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