17 Nov
2009
17 Nov
'09
12:01 p.m.
On Mon, 16 Nov 2009, Paolo Bonzini wrote:
On 11/16/2009 01:58 PM, Robert N. M. Watson wrote:
The rand(3) and random(3) APIs have well-defined characteristics with respect to repeatable behavior given a specific seed. If libdispatch uses srand(),rand(), it may interfere with the application's use of the same interfaces, replacing the application's seeding and consuming numbers from the sequence so that they are no longer returned to the application. Consider, for example, a simulator that accepts a seed as an argument so that the same sequence can be replayed.
That's in the test harness though, not in libdispatch.
Indeed. :-) Robert N M Watson Computer Laboratory University of Cambridge