[Mesa-dev] [PATCH 2/3] util/rand_xor: add function to seed rand
Timothy Arceri
tarceri at itsqueeze.com
Tue Mar 21 10:31:58 UTC 2017
On 21/03/17 21:07, Nicolai Hähnle wrote:
> Thanks, but this is now not thread-safe. I'm not sure how much we should
> care about that, but anyway, as I see it there are three options:
>
> 1) Add some kind of locking.
> 2) Make the caller provide a struct for the state (similar to rand_r).
> 3) Ignore the issue and add a fat warning comment about it.
>
> Personally, I'd say (2) is the most robust option.
>
No problem, I almost did that but settled on this since it wasn't a
problem with the current use. Will fix.
More information about the mesa-dev
mailing list