aboutsummaryrefslogtreecommitdiff
path: root/src/core/random.c
Commit message (Collapse)AuthorAge
* fixes #1083 Random number improvementsGarrett D'Amore2020-01-01
|
* fix a number of cppcheck complaints (not all)Garrett D'Amore2018-04-24
|
* Provide versions of mutex, condvar, and aio init that never fail.Garrett D'Amore2017-08-16
| | | | | | | | | | | | | | | | | | | | | | | If the underlying platform fails (FreeBSD is the only one I'm aware of that does this!), we use a global lock or condition variable instead. This means that our lock initializers never ever fail. Probably we could eliminate most of this for Linux and Darwin, since on those platforms, mutex and condvar initialization reasonably never fails. Initial benchmarks show little difference either way -- so we can revisit (optimize) later. This removes a lot of otherwise untested code in error cases and so forth, improving coverage and resilience in the face of allocation failures. Platforms other than POSIX should follow a similar pattern if they need this. (VxWorks, I'm thinking of you.) Most sane platforms won't have an issue here, since normally these initializations do not need to allocate memory. (Reportedly, even FreeBSD has plans to "fix" this in libthr2.) While here, some bugs were fixed in initialization & teardown. The fallback code is properly tested with dedicated test cases.
* Give up on uncrustify; switch to clang-format.Garrett D'Amore2017-07-10
|
* Taskq implementation.Garrett D'Amore2017-02-18
|
* New ISAAC pRNG. This replaces other local hacks for random data.Garrett D'Amore2017-01-08
Platforms must seed the pRNGs by offering an nni_plat_seed_prng() routine. Implementations for POSIX using various options (including the /dev/urandom device) are supplied.