sort: -R no longer disables multithreading
authorPaul R. Eggert <eggert@cs.ucla.edu>
Mon, 19 Jul 2010 17:46:41 +0000 (10:46 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 19 Jul 2010 17:48:00 +0000 (10:48 -0700)
commite5444fa2a7a2ad4246e7a5e961d5c4aad2aecbe9
treec0ec89d3e37b4de1cff1657fc7ccdaca057f7fa0
parente7523efb7d73cefcbd76b499f19fb473f8eb2d13
sort: -R no longer disables multithreading

* src/sort.c (random_md5_state): New static var.
(random_md5_state_init): New function, to initialize random_md5_state.
(random_state, randread_source): Remove.
(cmp_hashes): Use random_md5_state rather than random_state.
Break ties using memcmp, not by getting more randomness.
If MD5 collisions turn into a problem in practice, we should
simply use a better checksum.
(main): If -R is given, call random_md5_state_init rather than
going single-threaded.
src/sort.c