Lines Matching refs:buf

161 __srandom_r (unsigned int seed, struct random_data *buf)  in __srandom_r()  argument
170 if (buf == NULL) in __srandom_r()
172 type = buf->rand_type; in __srandom_r()
176 state = buf->state; in __srandom_r()
186 kc = buf->rand_deg; in __srandom_r()
200 buf->fptr = &state[buf->rand_sep]; in __srandom_r()
201 buf->rptr = &state[0]; in __srandom_r()
206 (void) __random_r (buf, &discard); in __srandom_r()
231 struct random_data *buf) in weak_alias()
233 if (buf == NULL) in weak_alias()
236 int32_t *old_state = buf->state; in weak_alias()
239 int old_type = buf->rand_type; in weak_alias()
243 old_state[-1] = (MAX_TYPES * (buf->rptr - old_state)) + old_type; in weak_alias()
262 buf->rand_type = type; in weak_alias()
263 buf->rand_sep = separation; in weak_alias()
264 buf->rand_deg = degree; in weak_alias()
267 buf->end_ptr = &state[degree]; in weak_alias()
269 buf->state = state; in weak_alias()
271 __srandom_r (seed, buf); in weak_alias()
275 state[-1] = (buf->rptr - state) * MAX_TYPES + type; in weak_alias()
295 __setstate_r (char *arg_state, struct random_data *buf) in weak_alias()
304 if (arg_state == NULL || buf == NULL) in weak_alias()
307 old_type = buf->rand_type; in weak_alias()
308 old_state = buf->state; in weak_alias()
312 old_state[-1] = (MAX_TYPES * (buf->rptr - old_state)) + old_type; in weak_alias()
318 buf->rand_deg = degree = random_poly_info.degrees[type]; in weak_alias()
319 buf->rand_sep = separation = random_poly_info.seps[type]; in weak_alias()
320 buf->rand_type = type; in weak_alias()
325 buf->rptr = &new_state[rear]; in weak_alias()
326 buf->fptr = &new_state[(rear + separation) % degree]; in weak_alias()
328 buf->state = new_state; in weak_alias()
330 buf->end_ptr = &new_state[degree]; in weak_alias()
353 __random_r (struct random_data *buf, int32_t *result) in weak_alias()
357 if (buf == NULL || result == NULL) in weak_alias()
360 state = buf->state; in weak_alias()
362 if (buf->rand_type == TYPE_0) in weak_alias()
370 int32_t *fptr = buf->fptr; in weak_alias()
371 int32_t *rptr = buf->rptr; in weak_alias()
372 int32_t *end_ptr = buf->end_ptr; in weak_alias()
390 buf->fptr = fptr; in weak_alias()
391 buf->rptr = rptr; in weak_alias()