1 /* SPDX-License-Identifier: GPL-2.0 */ 1 2 #ifndef __ASM_UM_ARCHRANDOM_H__ 3 #define __ASM_UM_ARCHRANDOM_H__ 4 5 #include <linux/types.h> 6 7 /* This is from <os.h>, but better not to #inc 8 ssize_t os_getrandom(void *buf, size_t len, un 9 10 static inline size_t __must_check arch_get_ran 11 { 12 ssize_t ret; 13 14 ret = os_getrandom(v, max_longs * size 15 if (ret < 0) 16 return 0; 17 return ret / sizeof(*v); 18 } 19 20 static inline size_t __must_check arch_get_ran 21 { 22 return 0; 23 } 24 25 #endif 26
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.