#include <stdlib.h> int drand48_r(struct drand48_data *buffer, double *result); int erand48_r(unsigned short xsubi[3], struct drand48_data *buffer, double *result); int lrand48_r(struct drand48_data *buffer, long *result); int nrand48_r(unsigned short xsubi[3], struct drand48_data *buffer, long *result); int mrand48_r(struct drand48_data *buffer,long *result); int jrand48_r(unsigned short xsubi[3], struct drand48_data *buffer, long *result); int srand48_r(long int seedval, struct drand48_data *buffer); int seed48_r(unsigned short seed16v[3], struct drand48_data *buffer); int lcong48_r(unsigned short param[7], struct drand48_data *buffer);
glibc 向けの機能検査マクロの要件 (feature_test_macros(7) 参照):
All functions shown above:
/* Glibc since 2.19: */ _DEFAULT_SOURCE
|| /* Glibc versions <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
最初に使う前に、この構造体は初期化されていなければならない。 初期化は、たとえば 0 で埋めたり、関数 srand48_r(), seed48_r(), lcong48_r() のいずれかを呼び出すことによって行われる。
インターフェース | 属性 | 値 |
drand48_r(), erand48_r(), lrand48_r(), nrand48_r(), mrand48_r(), jrand48_r(), srand48_r(), seed48_r(), lcong48_r() | Thread safety | MT-Safe race:buffer |
[man1]
[man2]
[man3]
[man4]
[man5]
[man6]
[man7]
[man8]
[a]
[b]
[c]
[d]
[e]
[f]
[g]
[h]
[i]
[j]
[k]
[l]
[m]
[n]
[o]
[p]
[q]
[r]
[s]
[t]
[u]
[v]
[w]
[x]
[y]
[z]