• Jinoh Kang's avatar
    server: Allow calling async_handoff() with status code STATUS_ALERTED. · 15483b1a
    Jinoh Kang authored
    If the server detects that an I/O request could be completed immediately
    (e.g. the socket to read from already has incoming data), it can now
    return STATUS_ALERTED to allow opportunistic synchronous I/O.  The Unix
    side will then attempt to perform I/O in nonblocking mode and report
    back the I/O status to the server via the new server request
    "set_async_direct_result".  If the operation returns e.g. EAGAIN
    or EWOULDBLOCK, the client can opt to either abandon the request (by
    specifying an error status) or poll for it in the server as usual (by
    waiting on the wait handle).
    
    Without such mechanism in place, the client cannot safely perform
    immediately satiable I/O operations synchronously, since it can
    potentially conflict with other pending I/O operations that have already
    been queued.
    Signed-off-by: 's avatarJinoh Kang <jinoh.kang.kr@gmail.com>
    Signed-off-by: 's avatarZebediah Figura <zfigura@codeweavers.com>
    Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
    15483b1a
async.c 25.9 KB