mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 22:02:27 +00:00
Make improvements
- Make rand64() thread safe - Introduce lemur64 lcg prng - Improve strace on New Technology - Improve msync() on New Technology
This commit is contained in:
parent
43ba3009b2
commit
29bf8b1a30
73 changed files with 888 additions and 269 deletions
|
@ -31,9 +31,12 @@
|
|||
* sysctl(KERN_ARND). If those aren't available then we try /dev/urandom
|
||||
* and if that fails, we use RDTSC and getpid().
|
||||
*
|
||||
* This function takes about 32 nanoseconds.
|
||||
*
|
||||
* @note this function could block a nontrivial time on old computers
|
||||
* @note this function is indeed intended for cryptography
|
||||
* @note this function takes around 800 cycles
|
||||
* @see rngset(), rdrand(), rand64()
|
||||
* @asyncsignalsafe
|
||||
* @vforksafe
|
||||
*/
|
||||
uint64_t rdseed(void) {
|
||||
int i;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue