Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

setstate(3) OSS Library Calls Reference Manual
NAME
setstate - Switches the state array used by the random number generator
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZSTFNSRL
G-series native OSS processes: /G/system/sysnn/zstfnsrl
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcredll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycredll
SYNOPSIS
#include <stdlib.h>
char *setstate (
const char *state
PARAMETERS
state Is a pointer to a state array.
DESCRIPTION
Switches the state array used for random number generation.
After you have initialized a state array with the initstate( ) function, you can use the setstate( )
function to switch state arrays. Subsequent calls to the random( ) function will use the state
array pointed to by the state parameter until either initstate( ) is called or setstate( ) is called
again.
NOTES
This function can be called by native processes only.
RETURN VALUES
The setstate( ) function returns a pointer to the previous state array.
ERRORS
None. This function does not set errno.
RELATED INFORMAITON
Functions: initstate(3), random(3), srandom(3).
STANDARDS CONFORMANCE
The setstate( ) function is defined in the XPG4 Version 2 specification.
646 Hewlett-Packard Company 527187-017