summaryrefslogtreecommitdiffstats
path: root/libc/stdlib/random.c
diff options
context:
space:
mode:
authorCarmelo Amoroso <carmelo.amoroso@st.com>2008-12-03 14:04:03 +0000
committerCarmelo Amoroso <carmelo.amoroso@st.com>2008-12-03 14:04:03 +0000
commitd5c32667ad11ff38dc46be527266297b38a341d1 (patch)
treeb3ce68f179d97e6e25e5c8e7ace845c4a561322b /libc/stdlib/random.c
parent329ef3196b396a70eecd5a4789845d368b488ab7 (diff)
downloaduClibc-alpine-d5c32667ad11ff38dc46be527266297b38a341d1.tar.bz2
uClibc-alpine-d5c32667ad11ff38dc46be527266297b38a341d1.tar.xz
Synch with trunk @ 24242
Step 18: some more synch: hidden_proto, size reduction and signal handling changes.
Diffstat (limited to 'libc/stdlib/random.c')
-rw-r--r--libc/stdlib/random.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/libc/stdlib/random.c b/libc/stdlib/random.c
index 6d5d06e09..967a1e52a 100644
--- a/libc/stdlib/random.c
+++ b/libc/stdlib/random.c
@@ -74,11 +74,7 @@ __UCLIBC_MUTEX_STATIC(mylock, PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP);
-/* For each of the currently supported random number generators, we have a
- break value on the amount of state information (you need at least this many
- bytes of state info to support this random number generator), a degree for
- the polynomial (actually a trinomial) that the R.N.G. is based on, and
- separation between the two lower order coefficients of the trinomial. */
+/* Keep constants in sync with random_r.c */
/* Linear congruential. */
#define TYPE_0 0
@@ -110,13 +106,8 @@ __UCLIBC_MUTEX_STATIC(mylock, PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP);
#define DEG_4 63
#define SEP_4 1
-
-/* Array versions of the above information to make code run faster.
- Relies on fact that TYPE_i == i. */
-
#define MAX_TYPES 5 /* Max number of types above. */
-
/* Initially, everything is set up as if from:
initstate(1, randtbl, 128);
Note that this initialization takes advantage of the fact that srandom