Install a source of entropy for the kernel's pseudorandom number generator
#include <sys/neutrino.h> int SysSrandom( const uint64_t *seedp ); int SysSrandom_r( const uint64_t *seedp );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The SysSrandom() and SysSrandom_r() kernel calls set one source of entropy that's used for the kernel's pseudorandom number generator (PRNG). These calls make it possible to use an external source, such as a random number generator implemented in hardware, to augment the other sources of entropy.
These functions are identical except in the way they indicate errors. See the Returns section for details.
Blocking states
These calls don't block.
EOK. If an error occurs:
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |