ntdll: Support receiving server reply data to memory with write watch.

Jacek Caban jacek at codeweavers.com
Thu Aug 3 09:08:13 CDT 2017


On 03.08.2017 09:48, Alexandre Julliard wrote:
> Jacek Caban <jacek at codeweavers.com> writes:
>
>> @@ -256,6 +256,7 @@ static void read_reply_data( void *buffer, size_t size )
>>          if (!ret) break;
>>          if (errno == EINTR) continue;
>>          if (errno == EPIPE) break;
>> +        if (errno == EFAULT && virtual_uninterrupted_write_memory( buffer, NULL, size ) >= size) continue;
>>          server_protocol_perror("read");
> You can't enter a critical section in the middle of a server call.

Oh, right, we could need to do another server call there. Unless I'm
missing something, it should work fine for platforms that have optimized
CS implementation (Linux and Mac) as they don't do server calls. We
could limit effect of the patch to those platform, but that would be ugly.

Could we just use pthread mutexes for
server_enter_uninterrupted_section/server_leave_uninterrupted_section
instead of critical sections?

Thanks,
Jacek



More information about the wine-devel mailing list