On Wed, 29 Dec 2021 at 19:53, <yla...@apache.org> wrote:
>
> Author: ylavic
> Date: Wed Dec 29 16:53:51 2021
> New Revision: 1896510
>
> URL: http://svn.apache.org/viewvc?rev=1896510&view=rev
> Log:
> Merge r1895106, r1895111, r1895175, r1895181, r1895465 from trunk:
>
>
> Fix drain wakeup pipe issue when multiple threads call 
> apr_pollset_wakeup/apr_pollcb_wakeup for the same pollset filling up drain 
> pipe. Use atomics so that wakeup call is noop if some other thread allready 
> done this
>
>
> Follow up to r1895106: now we want blocking reads on unix too so revert 
> r1894914.
>
>
> Follow up to r1895106: Use less expensive atomics for wakeup.
>
> If pipe writers (wakeup) put a single byte until it's consumed by the
> reader (drain), it's enough to use an atomic cas for the writers (still) and
> an atomic (re)set for the reader (no more cas here).
>
> This requires that the reader never blocks on read though (e.g. spurious 
> return
> from poll), so make the read side on the pipe non-blocking again/finally.
>
> Since synchronous non-blocking read is not a thing for Windows' Readfile(), 
> add
> a ->socket flag to this arch's apr_file_t (like the existing ->pipe one) which
> file_socket_pipe_create() will set to make apr_file_read/write() handle
> non-blocking (nor overlapped) socket pipes with WSARecv/Send().
>
>
> Use enum instead multiple booleans
>
>
> Fix remaining change when apr_filetype_e was added
>
>
Hi Yann,

This change does not compile on Windows in APR 1.7.x:
[[[
file_io\win32\readwrite.c(325): error C2065: 'file': undeclared identifier
file_io\win32\readwrite.c(325): error C2223: left of '->filehand' must
point to struct/union
file_io\win32\readwrite.c(325): warning C4047: 'function': 'SOCKET'
differs in levels of indirection from 'WSABUF *'
file_io\win32\readwrite.c(325): warning C4024: 'WSASend': different
types for formal and actual parameter 1
file_io\win32\readwrite.c(325): warning C4047: 'function': 'LPWSABUF'
differs in levels of indirection from 'int'
file_io\win32\readwrite.c(325): warning C4024: 'WSASend': different
types for formal and actual parameter 2
file_io\win32\readwrite.c(325): warning C4047: 'function': 'DWORD'
differs in levels of indirection from 'DWORD *'
file_io\win32\readwrite.c(325): warning C4024: 'WSASend': different
types for formal and actual parameter 3
file_io\win32\readwrite.c(326): warning C4047: 'function': 'LPDWORD'
differs in levels of indirection from 'DWORD'
file_io\win32\readwrite.c(326): warning C4024: 'WSASend': different
types for formal and actual parameter 4
file_io\win32\readwrite.c(326): warning C4047: 'function': 'DWORD'
differs in levels of indirection from 'void *'
file_io\win32\readwrite.c(326): warning C4024: 'WSASend': different
types for formal and actual parameter 5
file_io\win32\readwrite.c(325): error C2198: 'WSASend': too few
arguments for call
]]]

I also have a high-level objection against backporting this change to
APR 1.7.x: IMHO APR 1.7.x is a stable branch and I think that only
regression fixes should be backported to the stable branch. r1896510
is a significant change and as far as I understand it's not a
regression fix. So I think it would be better to revert r1896510 and
release it as part of APR 2.0 (or 1.8.x).


--
Ivan Zhakov

Reply via email to