diff options
| author | 2015-12-02 09:33:25 -0800 | |
|---|---|---|
| committer | 2015-12-02 09:33:25 -0800 | |
| commit | 0eea505058740aa45486145296ef4fefbd8cab85 (patch) | |
| tree | 1bc265d615b8353405a04630f610a42c48302f47 /include/linux/random.h | |
| parent | Input: parkbd - drop bogus __init from parkbd_allocate_serio() (diff) | |
| parent | Linux 4.4-rc3 (diff) | |
Merge tag 'v4.4-rc3' into next
Merge with Linux 4.4-rc3 to bring in helpers for multiu-driver modules.
Diffstat (limited to 'include/linux/random.h')
| -rw-r--r-- | include/linux/random.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/random.h b/include/linux/random.h index e651874df2c9..a75840c1aa71 100644 --- a/include/linux/random.h +++ b/include/linux/random.h @@ -7,6 +7,8 @@ #define _LINUX_RANDOM_H #include <linux/list.h> +#include <linux/once.h> + #include <uapi/linux/random.h> struct random_ready_callback { @@ -45,6 +47,10 @@ struct rnd_state { u32 prandom_u32_state(struct rnd_state *state); void prandom_bytes_state(struct rnd_state *state, void *buf, size_t nbytes); +void prandom_seed_full_state(struct rnd_state __percpu *pcpu_state); + +#define prandom_init_once(pcpu_state) \ + DO_ONCE(prandom_seed_full_state, (pcpu_state)) /** * prandom_u32_max - returns a pseudo-random number in interval [0, ep_ro) |
