14 Commits

Author SHA1 Message Date
cb17448b56 mpm_fdqueue: return EOF for ap_queue_interrupt_*() when terminated.
* server/mpm_fdqueue.c (queue_interrupt): noop and return APR_EOF when queue is
  terminated already.

* server/mpm_fdqueue.h (struct fd_queue_t): make "terminated" volatile.

Follow up to r1891716.
Github: closes #208


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1891724 13f79535-47bb-0310-9956-ffa450edef68
2021-07-22 15:48:03 +00:00
a2bffd4e61 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
2020-07-02 00:04:57 +00:00
30b587effb mpm_fdqueue: follow up to r1821624.
Export ap_queue_*() fonctions, so that they are accessible from MPMs, but
don't provide "mpm_fdqueue.h" in the API (include/).



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1822366 13f79535-47bb-0310-9956-ffa450edef68
2018-01-27 02:01:47 +00:00
5b6172385f mpm_fdqueue: follow up to r1821624.
Make the allocation and zero-ing in ap_queue_init() => ap_queue_create().



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1821660 13f79535-47bb-0310-9956-ffa450edef68
2018-01-19 14:16:01 +00:00
41ca9b3d01 mpm_fdqueue: follow up to r1821624.
Be explicit in the naming about what's push/pop-ed.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1821651 13f79535-47bb-0310-9956-ffa450edef68
2018-01-19 13:46:28 +00:00
a121a58370 mpm_fdqueue: follow up to r1821624.
Cosmetics, 80 cols, no functional change.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1821649 13f79535-47bb-0310-9956-ffa450edef68
2018-01-19 13:22:30 +00:00
c61a6e27e5 mpm_fdqueue: follow up to r1821624.
Fix typo in comment.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1821648 13f79535-47bb-0310-9956-ffa450edef68
2018-01-19 12:59:12 +00:00
3f16856817 mpm_fdqueue: follow up to r1821624.
The code is not part of the API.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1821647 13f79535-47bb-0310-9956-ffa450edef68
2018-01-19 12:57:20 +00:00
22d8be1cf5 mpm_fdqueue: follow up to r1821624.
Prepare mpm_worker to use common fdqueue.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1821635 13f79535-47bb-0310-9956-ffa450edef68
2018-01-19 12:24:52 +00:00
2ef30515cf mpm_fdqueue: follow up to r1821624.
Rename ap_queue_info_get_idlers() to ap_queue_info_num_idlers().



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1821629 13f79535-47bb-0310-9956-ffa450edef68
2018-01-19 12:20:44 +00:00
39b3f18392 mpm_fdqueue: follow up to r1821624.
Style, no functional change.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1821627 13f79535-47bb-0310-9956-ffa450edef68
2018-01-19 12:15:17 +00:00
2f79ba80b5 mpm_fdqueue: follow up to r1821624.
Opacify fdqueue types.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1821626 13f79535-47bb-0310-9956-ffa450edef68
2018-01-19 12:12:17 +00:00
0222a38bc8 mpm_fdqueue: follow up to r1821624.
And now it's mpm_fdqueue, with minimal #includes.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1821625 13f79535-47bb-0310-9956-ffa450edef68
2018-01-19 12:07:23 +00:00
62b44b5ec4 Shared fdqueue code between MPMs event and worker into mpm_fdqueue.
This first step moves the files server/mpm/event/fdqueue.[ch] to
server/mpm_fdqueue.[ch] (untouched for now, simple svn move).

Will follow up with the necessary changes to mpm_unix.* for common code.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1821624 13f79535-47bb-0310-9956-ffa450edef68
2018-01-19 11:46:12 +00:00