summaryrefslogtreecommitdiff
path: root/include/linux/random.h
diff options
context:
space:
mode:
authorTom Herbert <therbert@google.com>2013-01-22 13:49:50 +0400
committerDavid S. Miller <davem@davemloft.net>2013-01-23 22:44:00 +0400
commit055dc21a1d1d219608cd4baac7d0683fb2cbbe8a (patch)
tree23e66bde4668a92585f62d15c759c53fd4d0892f /include/linux/random.h
parent4a633a602c26497b8285a202830829d3be007c7b (diff)
downloadlinux-055dc21a1d1d219608cd4baac7d0683fb2cbbe8a.tar.xz
soreuseport: infrastructure
Definitions and macros for implementing soreusport. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/random.h')
-rw-r--r--include/linux/random.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/random.h b/include/linux/random.h
index d9846088c2c5..347ce553a306 100644
--- a/include/linux/random.h
+++ b/include/linux/random.h
@@ -74,4 +74,10 @@ static inline int arch_get_random_int(unsigned int *v)
}
#endif
+/* Pseudo random number generator from numerical recipes. */
+static inline u32 next_pseudo_random32(u32 seed)
+{
+ return seed * 1664525 + 1013904223;
+}
+
#endif /* _LINUX_RANDOM_H */