From: r_zaca <r_zaca@ig.com.br>
To: linux-c-programming@vger.kernel.org
Subject: Re: Random number generator
Date: Thu, 10 Mar 2005 08:01:19 -0300 [thread overview]
Message-ID: <20050310_110119_011142.r_zaca@ig.com.br> (raw)
[-- Attachment #1: Mail message body --]
[-- Type: text/plain, Size: 823 bytes --]
I read about somethink like that another day in the www.embedded.com. I
don't have the exact link, but you can shearch for it. Good luck.
Vineet Joglekar wrote:
> Hi all,
>
> Can someone please tell me where can I find and which
> random/pseudo-random number generator can I use inside the linux
> kernel? (2.4.28)
>
> I found out 1 function get_random_bytes() in
> linux/drivers/char/random.c but thats not what I want.
>
> I want a function where I will be supplying a seed to that function
> as an input, and will get a random number back. If same seed is used,
> same number should be generated again.
Without knowing what you're doing I can't say if it justifies having all
that extra code around, but the stuff from the library, like srand48,
will do this. You can add the code to your module.
reply other threads:[~2005-03-10 11:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050310_110119_011142.r_zaca@ig.com.br \
--to=r_zaca@ig.com.br \
--cc=linux-c-programming@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).