Displaying 2 results from an estimated 2 matches for "9170e083".
2012 Dec 01
0
[LLVMdev] Use rand_r() instead of non-reentrant thread-unsafe rand() in GetRandomNumber()
...info/llvmdev
>>>
>>>
>>
>>
>> --
>>
>> Thanks,
>>
>> Justin Holewinski
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121201/9170e083/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm.rand.patch
Type: application/octet-stream
Size: 416 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121201/9170e083/attachment.obj>
2012 Dec 01
2
[LLVMdev] Use rand_r() instead of non-reentrant thread-unsafe rand() in GetRandomNumber()
Agreed, done.
One thing I'm not sure about is this statement in docs:
POSIX.1-2008 marks *rand_r*() as obsolete.
- And... what is the replacement?
2012/12/1 Justin Holewinski <justin.holewinski at gmail.com>
> If we're keeping the state locally now, perhaps we should store it in a
> per-thread variable. I know rand() isn't thread safe to begin with, but it
> seems