4.20 _rand_r()

Defined in stdlib.h, the _rand_r() function is a reentrant version of the rand() function.

Syntax

int _rand_r(struct _rand_state * buffer);

where:

buffer

is a pointer to a user-supplied buffer storing the state of the random number generator.

Usage

This function enables you to explicitly supply your own buffer in thread-local storage.

Non-ConfidentialPDF file icon PDF versionARM DUI0475M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.