X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=init.c;h=2c6c8204213ffd6030633aeddd52a9e80d3bd559;hp=d02056cc12b08cd837165ed57ee5679abd6a3421;hb=5c4e1dbc4ec6ee963220c5f4e64a04cd6130dc81;hpb=22f78b320a8d2ffa32b5736fe754c108a8d21525;ds=sidebyside diff --git a/init.c b/init.c index d02056cc..2c6c8204 100644 --- a/init.c +++ b/init.c @@ -256,9 +256,9 @@ int init_random_state(struct thread_data *td) close(fd); - srand48_r(seeds[0], &td->bsrange_state); - srand48_r(seeds[1], &td->verify_state); - srand48_r(seeds[2], &td->rwmix_state); + os_random_seed(seeds[0], &td->bsrange_state); + os_random_seed(seeds[1], &td->verify_state); + os_random_seed(seeds[2], &td->rwmix_state); if (td->sequential) return 0; @@ -272,7 +272,7 @@ int init_random_state(struct thread_data *td) td->num_maps = num_maps; memset(td->file_map, 0, num_maps * sizeof(long)); - srand48_r(seeds[3], &td->random_state); + os_random_seed(seeds[3], &td->random_state); return 0; } @@ -667,10 +667,11 @@ int parse_jobs_ini(char *file) fprintf(stderr, "io priorities not available\n"); ret = 1; break; -#endif +#else td->ioprio |= prioclass << IOPRIO_CLASS_SHIFT; fgetpos(f, &off); continue; +#endif } if (!check_int(p, "direct", &td->odirect)) { fgetpos(f, &off);