16 Nov
2009
16 Nov
'09
1:17 p.m.
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. Paolo