1 #ifndef _LINUX_PRANDOM_H
2 #define _LINUX_PRANDOM_H
4 #include <linux/random.h>
6 static inline void prandom_bytes(void *buf, int nbytes)
8 return get_random_bytes(buf, nbytes);
11 #define prandom_type(type) \
12 static inline type prandom_##type(void) \
16 prandom_bytes(&v, sizeof(v)); \
26 static inline u32 prandom_u32_max(u32 max)
28 return prandom_u32() % max;
32 #endif /* _LINUX_PRANDOM_H */