[Top][All Lists]

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

Re: [Qemu-devel] [PATCH v4 06/10] qemu-ga: Add Windows VSS provider to q

From: Laszlo Ersek
Subject: Re: [Qemu-devel] [PATCH v4 06/10] qemu-ga: Add Windows VSS provider to quiesce applications on fsfreeze
Date: Fri, 28 Jun 2013 12:44:36 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130513 Thunderbird/17.0.6

>>>>> +STDAPI DllCanUnloadNow()
>>>>> +{
>>>>> +    return g_nComObjsInUse == 0 ? S_OK : S_FALSE;
>>>>> +}
>> Don't you need some kind of atomic or locked read here? We could read a
>> stale value here. Granted, most stale values would err on the safe side
>> (ie. read >0 instead of ==0), but in theory the other mistake is
>> possible, no?
> MSDN says "Simple reads and writes to properly-aligned 32bit variables
> are atomic", and I couldn't find a function to atomic read provided.
> (Maybe InterlockedCompareExchange(&g_nComObjsInUse, 0, 0)...?)

Alright then. Thanks!

reply via email to

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