On Sun, Sep 23, 2012 at 4:27 PM, Stefan Weil <s...@weilnetz.de> wrote:
>> On Sat, Sep 22, 2012 at 8:26 PM, Stefan Weil <s...@weilnetz.de> wrote:
>>> Those functions are missing in MinGW.
>>>
>>> Some versions of MinGW-w64 include defines for gmtime_r and localtime_r.
>>> Older versions of these macros are buggy (they return a pointer to a
>>> static variable), therefore we don't want them. Newer versions are
>>> similar to the code used here, but without the memset.
>>>
>>> The implementation which is used here is not strictly reentrant,
>>> but sufficiently good for QEMU on w32 or w64.
>>
>> For now, but nothing shows that there is a problem. Adding a few
>> simple locks shouldn't be difficult, or FIXME/XXX comment otherwise.
>>
>
> Does (or will) QEMU support preemptive scheduling of threads?
> If not, there is no reentrancy problem because gmtime / localtime
> don't trigger scheduling.

Right, but it looks like the plan is to use thread safe versions. If
not, reverting the original patch that introduced _r versions would
have been OK.

>
> Of course adding comments is always a good idea. Feel free to add one
> or wait until I send a v2 patch.

OK, I'll add a comment.

>
> Regards
>
> Stefan
>
>

Reply via email to