diff --git a/extra/random/rdrand/authors.txt b/extra/random/rdrand/authors.txt new file mode 100644 index 0000000000..e091bb8164 --- /dev/null +++ b/extra/random/rdrand/authors.txt @@ -0,0 +1 @@ +John Benediktsson diff --git a/extra/random/rdrand/rdrand.factor b/extra/random/rdrand/rdrand.factor new file mode 100644 index 0000000000..a164214763 --- /dev/null +++ b/extra/random/rdrand/rdrand.factor @@ -0,0 +1,13 @@ +! Copyright (C) 2013 John Benediktsson +! See http://factorcode.org/license.txt for BSD license + +USING: cpu.x86.features kernel random ; + +IN: random.rdrand + +SINGLETON: rdrand + +M: rdrand random-32* drop rdrand32 ; + +: with-rdrand ( quot -- ) + [ rdrand ] dip with-random ; inline diff --git a/extra/random/rdrand/summary.txt b/extra/random/rdrand/summary.txt new file mode 100644 index 0000000000..b51c359972 --- /dev/null +++ b/extra/random/rdrand/summary.txt @@ -0,0 +1 @@ +RDRAND random generator