qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] w32: Add implementation of gmtime_r, localtime_


From: Stefan Weil
Subject: Re: [Qemu-devel] [PATCH] w32: Add implementation of gmtime_r, localtime_r
Date: Sun, 23 Sep 2012 18:27:37 +0200
User-agent: SquirrelMail/1.4.21

> On Sat, Sep 22, 2012 at 8:26 PM, Stefan Weil <address@hidden> 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.

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

Regards

Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]