ntdll: Make msync() asynchronous in NtFlushVirtualMemory (resubmit with real name)

Mathis Beer default_357-line at yahoo.de
Mon Mar 11 20:21:36 CDT 2013


On 03/11/13 21:23, Alexandre Julliard wrote:
> Mathis Beer <default_357-line at yahoo.de> writes:
>
>> diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
>> index a99bca4..e4f2bb6 100644
>> --- a/dlls/ntdll/virtual.c
>> +++ b/dlls/ntdll/virtual.c
>> @@ -62,6 +62,10 @@ WINE_DECLARE_DEBUG_CHANNEL(module);
>>  #define MS_SYNC 0
>>  #endif
>>  
>> +#ifndef MS_ASYNC
>> +#define MS_ASYNC 1
>> +#endif
> That's questionable, there's no reason the value would be 1. We defined
> MS_SYNC to 0 on the theory that it's better to pass 0 than making up
> values, but probably not calling the function at all would be
> preferable.
>
#define MS_ASYNC 1 was taken from my /usr/include/bits/mman.h . The msync  manpage does not define the sync behavior of the function when neither MS_SYNC nor MS_ASYNC are set; it probably defaults to safe. In any case, since MS_SYNC is an already-defined constant (four), defining it to 0 is highly misleading. I thought it was bad style to import system headers in Wine code. :)

In any case thanks for the response, I'll submit an improved patch.



More information about the wine-devel mailing list