Go to the source code of this file.
|
static unsigned long | next = 1 |
|
◆ __attribute__()
Definition at line 71 of file rand.c.
73 unsigned long val = (
unsigned long)*ctx;
76 *ctx = (
unsigned int)val;
static int do_rand(unsigned long *ctx)
References do_rand().
◆ do_rand()
static int do_rand |
( |
unsigned long * |
ctx | ) |
|
|
static |
Definition at line 35 of file rand.c.
37 #ifdef USE_WEAK_SEEDING 43 return ((*ctx = *ctx * 1103515245 + 12345) % ((
unsigned long)
RAND_MAX + 1));
62 x = 16807 * lo - 2836 * hi;
67 return (
int)((*ctx = (
unsigned long)x) % ((
unsigned long)
RAND_MAX + 1));
References RAND_MAX.
Referenced by __attribute__().
◆ next