函数源码 |
Source File:lib\random32.c |
Create Date:2022-07-27 07:16:30 |
首页 | Copyright©Brick |
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 | void prandom_seed_full_state( struct rnd_state __percpu *pcpu_state) { int i; for_each_possible_cpu(i) { struct rnd_state *state = per_cpu_ptr(pcpu_state, i); u32 seeds[4]; get_random_bytes(&seeds, sizeof (seeds)); state->s1 = __seed(seeds[0], 2U); state->s2 = __seed(seeds[1], 8U); state->s3 = __seed(seeds[2], 16U); state->s4 = __seed(seeds[3], 128U); prandom_warmup(state); } } |