Lines Matching defs:block
21 static ssize_t get_entropy_from_instruction(void* buf, size_t len, bool block,
23 static ssize_t get_entropy_from_rdseed(void* buf, size_t len, bool block);
24 static ssize_t get_entropy_from_rdrand(void* buf, size_t len, bool block);
30 * If |block|=true, it will retry the RDSEED instruction until |len| bytes are
37 static ssize_t get_entropy_from_cpu(void* buf, size_t len, bool block) {
47 return get_entropy_from_rdseed(buf, len, block);
49 return get_entropy_from_rdrand(buf, len, block);
69 static ssize_t get_entropy_from_instruction(void* buf, size_t len, bool block,
76 if (!block) {
85 if (block) {
91 static ssize_t get_entropy_from_rdseed(void* buf, size_t len, bool block) {
92 return get_entropy_from_instruction(buf, len, block, ENTROPY_INSTR_RDSEED);
95 static ssize_t get_entropy_from_rdrand(void* buf, size_t len, bool block) {
102 return get_entropy_from_instruction(buf, len, block, ENTROPY_INSTR_RDRAND);
105 size_t hw_rng_get_entropy(void* buf, size_t len, bool block) {
110 ssize_t res = get_entropy_from_cpu(buf, len, block);