Re: rand() in while in kernel mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 22, 2002 at 08:04:01AM +0200, Tomas Ukkonen wrote:
> Yes, that's probably the right way to do it. I was just wondering if
> there's some reason why I shouldn't. Drivers/net/hamradio/yam.c
> generates its own random numbers. Does anyone know why it does that or
> is it just sloppy coding?

There's probably no reason why a per-instance seed and a cookbook
pseudorandom number generator (e.g. Park-Miller) won't suffice. Most
of these rand()s don't require more than a few machine words of state.


Cheers,
Bill
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux