JM プロジェクトは、主に Linux 関連のマニュアルページの日本語ページを翻訳・公開しています。
... (2) manual page for details. When read, the /dev/urandom device returns random bytes using a pseudorandom number generator seeded from the entropy pool. Reads from this device do not block (i.e., the CPU is not yielded), but can incur an appreciable ... テムの起動時に実行される適切なスクリプトに、 以下の行を追加すればよい: echo "Initializing random number generator..." random_seed=/var/run/random-seed # 乱数種を今回のスタートアップから次回のスタートアップまで持ち越す。 # ロードを行い、その後、全てのエ ... ントロピープールを保存する。 if [ -f $random_seed ]; then cat $random_seed >/dev/urandom else touch $random_seed fi chmod 600 $random_seed poolfile=/proc/sys/kernel/random/ ... ... (2) manual page for details. When read, the /dev/urandom device returns random bytes using a pseudorandom number generator seeded from the entropy pool. Reads from this device do not block (i.e., the CPU is not yielded), but can incur an appreciable ... テムの起動時に実行される適切なスクリプトに、 以下の行を追加すればよい: echo "Initializing random number generator..." random_seed=/var/run/random-seed # 乱数種を今回のスタートアップから次回のスタートアップまで持ち越す。 # ロードを行い、その後、全てのエ ... ントロピープールを保存する。 if [ -f $random_seed ]; then cat $random_seed >/dev/urandom else touch $random_seed fi chmod 600 $random_seed poolfile=/proc/sys/kernel/random/ ... ... を行うには、再入可能な rand_r () 関数を使用する。 rand () と同様、 rand_r () は [0, RAND_MAX ] の範囲の疑似乱数整数を返す。 seedp 引数は、 rand_r () の呼び出し間で状態を保持するために使用される unsigned int へのポインターである。 seedp が指す整数に同じ ... 初期値を rand_r () を呼び出し、 呼び出し間でその値が変更されなければ、同じ疑似乱数系列が得られる。 rand_r () の seedp 引数が指す値により提供される状態は非常に小さな空間 なので、この関数は弱い疑似乱数生成器になってしまう。 代わりに drand48_ ... / int myrand(void) { next = next * 1103515245 + 12345; return((unsigned)(next/65536) % 32768); } void mysrand(unsigned int seed) { next = seed; } 以下のプログラムを使うと、特定の乱数の種が与えられた場合に rand () が生成する疑似乱数系列を表示することが ... ... を行うには、再入可能な rand_r () 関数を使用する。 rand () と同様、 rand_r () は [0, RAND_MAX ] の範囲の疑似乱数整数を返す。 seedp 引数は、 rand_r () の呼び出し間で状態を保持するために使用される unsigned int へのポインターである。 seedp が指す整数に同じ ... 初期値を rand_r () を呼び出し、 呼び出し間でその値が変更されなければ、同じ疑似乱数系列が得られる。 rand_r () の seedp 引数が指す値により提供される状態は非常に小さな空間 なので、この関数は弱い疑似乱数生成器になってしまう。 代わりに drand48_ ... / int myrand(void) { next = next * 1103515245 + 12345; return((unsigned)(next/65536) % 32768); } void mysrand(unsigned int seed) { next = seed; } 以下のプログラムを使うと、特定の乱数の種が与えられた場合に rand () が生成する疑似乱数系列を表示することが ... ... を行うには、再入可能な rand_r () 関数を使用する。 rand () と同様、 rand_r () は [0, RAND_MAX ] の範囲の疑似乱数整数を返す。 seedp 引数は、 rand_r () の呼び出し間で状態を保持するために使用される unsigned int へのポインターである。 seedp が指す整数に同じ ... 初期値を rand_r () を呼び出し、 呼び出し間でその値が変更されなければ、同じ疑似乱数系列が得られる。 rand_r () の seedp 引数が指す値により提供される状態は非常に小さな空間 なので、この関数は弱い疑似乱数生成器になってしまう。 代わりに drand48_ ... / int myrand(void) { next = next * 1103515245 + 12345; return((unsigned)(next/65536) % 32768); } void mysrand(unsigned int seed) { next = seed; } 以下のプログラムを使うと、特定の乱数の種が与えられた場合に rand () が生成する疑似乱数系列を表示することが ... ... t * result ); int srandom_r(unsigned int seed , struct random_data * buf ); int initstate_r(unsigned int seed , char * statebuf , size_t statelen , struct random_data * ... number is returned in the argument result . The srandom_r () function is like srandom (3), except that it initializes the seed for the random number generator whose state is maintained in the object pointed to by buf , which must have been previousl ... y initialized by initstate_r (), instead of the seed associated with the global state variable. The initstate_r () function is like initstate (3) except that it initializes th ... ... t * result ); int srandom_r(unsigned int seed , struct random_data * buf ); int initstate_r(unsigned int seed , char * statebuf , size_t statelen , struct random_data * ... number is returned in the argument result . The srandom_r () function is like srandom (3), except that it initializes the seed for the random number generator whose state is maintained in the object pointed to by buf , which must have been previousl ... y initialized by initstate_r (), instead of the seed associated with the global state variable. The initstate_r () function is like initstate (3) except that it initializes th ... ... t * result ); int srandom_r(unsigned int seed , struct random_data * buf ); int initstate_r(unsigned int seed , char * statebuf , size_t statelen , struct random_data * ... number is returned in the argument result . The srandom_r () function is like srandom (3), except that it initializes the seed for the random number generator whose state is maintained in the object pointed to by buf , which must have been previousl ... y initialized by initstate_r (), instead of the seed associated with the global state variable. The initstate_r () function is like initstate (3) except that it initializes th ... ... t * result ); int srandom_r(unsigned int seed , struct random_data * buf ); int initstate_r(unsigned int seed , char * statebuf , size_t statelen , struct random_data * ... number is returned in the argument result . The srandom_r () function is like srandom (3), except that it initializes the seed for the random number generator whose state is maintained in the object pointed to by buf , which must have been previousl ... y initialized by initstate_r (), instead of the seed associated with the global state variable. The initstate_r () function is like initstate (3) except that it initializes th ... ... unsigned seed , char * state , size_t n ); char *setstate(char * state ); glibc 向けの機能検査マクロの要件 ( feature_test_macros (7) 参照 ... nd 256 bytes; other amounts will be rounded down to the nearest known amount. Using less than 8 bytes results in an error. seed is the seed for the initialization, which specifies a starting point for the random number sequence, and provides for rest ... 日本語の文書やマニュアルを配布している個人/プロジェクトへのリンクです。