]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
mpm_event: poll callbacks fixes and improvements.
authorYann Ylavic <ylavic@apache.org>
Thu, 2 Jul 2020 00:04:57 +0000 (00:04 +0000)
committerYann Ylavic <ylavic@apache.org>
Thu, 2 Jul 2020 00:04:57 +0000 (00:04 +0000)
commita2bffd4e6179d45276bf7c1349325be14c43e589
treebf6182a10bd880a5d5e8d1a22a0df56392a16807
parentea4d778cd6a938a68181dde024a2ee7889695bc3
mpm_event: poll callbacks fixes and improvements.

server/mpm_fdqueue.h;
    Rename "remove" field to "pfds" in timer_event_t.

server/mpm/event/event.c:
    update_reqevents_from_sense():
        New helper to update pfd->reqevents according to the given cs->sense
        for CONN_STATE_WRITE_COMPLETION, reusable in process_socket() and
        event_resume_suspended().

    event_resume_suspended():
        Process lingering close if given cs->state = CONN_STATE_LINGER.
        Call notify_suspend() before entering CONN_STATE_WRITE_COMPLETION.

    event_register_poll_callback_ex():
        Don't poll pfds with reqevents == 0.

    listener_thread():
        Run event_cleanup_poll_callback to both remove the registered pfds
        and leave pfds->pool in a consistent state.
        Process users callabacks after all PT_USER batons have been collected
        in the result pfds loop, otherwise we might race with the callbacks
        within the loop if multiple events/sockets concern the same baton, and
        crash if pfds->pool is cleared.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879417 13f79535-47bb-0310-9956-ffa450edef68
server/mpm/event/event.c
server/mpm_fdqueue.h