diff options
author | imp <imp@FreeBSD.org> | 2015-02-27 21:15:12 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2015-02-27 21:15:12 +0000 |
commit | c20b5fa0f26a35dd5df9120984068179c82d1c6f (patch) | |
tree | 667de0aedd57f1a1cf27a65767a4399907937094 /contrib/netbsd-tests/lib/libc/stdlib/h_getopt.c | |
parent | 025a6af6601409f7b340b0e3a4cd9acf9ffcf1bd (diff) | |
download | FreeBSD-src-c20b5fa0f26a35dd5df9120984068179c82d1c6f.zip FreeBSD-src-c20b5fa0f26a35dd5df9120984068179c82d1c6f.tar.gz |
Make sched_random() return an unsigned number, and use uint32_t
consistently. This also matches the per-cpu pointer declaration
anyway.
This changes the tweak we give to the load from -32..31 to be 0..31
which seems more inline with the rest of the code (- rnd and the -=
64). It should also provide the randomness we need, and may fix a
signedness bug in the old code (it isn't clear that the effect was
intentional as opposed to sloppy, and the right shift of a signed
value is undefined to boot).
This stores sched_balance() behavior when it used random().
Differential Revision: https://reviews.freebsd.org/D1981
Diffstat (limited to 'contrib/netbsd-tests/lib/libc/stdlib/h_getopt.c')
0 files changed, 0 insertions, 0 deletions