2 * Copyright (c) 1993 Martin Birgmeier
5 * You may redistribute unmodified or modified versions of this source
6 * code provided that the above copyright notice and this and the
7 * following conditions are retained.
9 * This software is provided ``as is'', and comes with no warranties
10 * of any kind. I shall in no event be liable for anything that happens
11 * to anyone/anything when using this software.
16 #ifdef _REENT_THREAD_LOCAL
17 _Thread_local
unsigned short _tls_rand48_seed
[3] = {_RAND48_SEED_0
, _RAND48_SEED_1
,
19 _Thread_local
unsigned short _tls_rand48_mult
[3] = {_RAND48_MULT_0
, _RAND48_MULT_1
,
21 _Thread_local
unsigned short _tls_rand48_add
= _RAND48_ADD
;
25 _lcong48_r (struct _reent
*r
,
28 _REENT_CHECK_RAND48(r
);
29 __rand48_seed
[0] = p
[0];
30 __rand48_seed
[1] = p
[1];
31 __rand48_seed
[2] = p
[2];
32 __rand48_mult
[0] = p
[3];
33 __rand48_mult
[1] = p
[4];
34 __rand48_mult
[2] = p
[5];
40 lcong48 (unsigned short p
[7])
42 _lcong48_r (_REENT
, p
);
44 #endif /* !_REENT_ONLY */