summaryrefslogtreecommitdiff
path: root/poll
Commit message (Collapse)AuthorAgeFilesLines
* backport APR_POLLSET_THREADSAFE pollset support for z/OS.covener2013-10-213-0/+781
| | | | | | | | some doxygen updates git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.5.x@1534274 13f79535-47bb-0310-9956-ffa450edef68
* From trunk:trawick2011-04-292-4/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | 1. r1089433 poll, pollset, pollcb on Windows: Handle calls with no file/socket descriptors. PR: 49882 Patch for one situation submitted by: Stefan Ruppert <sr myarm.com> Extended by: trawick 2. r1089528 fix variable initialization bug in r1089433 3. r987639 disable entire impl_pollcb_create() function if APR_HAS_THREADS instead of just inserting a return at the top 4. tiny part of r899905 move decl of loop control variables to the block where used git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.5.x@1097783 13f79535-47bb-0310-9956-ffa450edef68
* grab some Windows/MinGW code tweaks from trunk for quieter gcc buildstrawick2011-03-221-8/+0
| | | | | | | | | | | | time/win32/timestr.c: all of r892188 include/arch/win32/apr_arch_file_io.h: part of r892386 misc/win32/rand.c: all of r892426 misc/win32/misc.c: part of r892177 misc/win32/internal.c: all of r892390 poll/unix/pollset.c: part of r892386 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.5.x@1084310 13f79535-47bb-0310-9956-ffa450edef68
* Merge r933271 from trunk:trawick2010-04-121-0/+3
| | | | | | | | | | | apr_pollset_create_ex(): Trap errors from pollset providers. PR: 49094 Submitted by: Sami Tolvanen <sami.tolvanen mywot.com> Reviewed by: trawick git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.5.x@933274 13f79535-47bb-0310-9956-ffa450edef68
* backport from trunk r932585:trawick2010-04-091-15/+14
| | | | | | | | | | | fix misuse of autodata in initialization of the wakeup pipe when the pollset was created with APR_POLLSET_NOCOPY Submitted by: Neil Conway <nrc cs.berkeley.edu> Reviewed by: trawick git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.5.x@932599 13f79535-47bb-0310-9956-ffa450edef68
* merge r834040 from trunk:trawick2009-11-142-16/+22
| | | | | | | | | | | fix special poll() processing on Win32 to be consistent between . apr_{pollset|pollcb}_create_ex(..., APR_POLLSET_DEFAULT) and . apr_{pollset|pollcb}_create(...) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@836107 13f79535-47bb-0310-9956-ffa450edef68
* merge r834029 from trunk:trawick2009-11-142-28/+30
| | | | | | | | | | | | apr_pollset_create_ex(), apr_pollcb_create_ex(): simplify logic to update the caller's pollcb/pollset ptr, fixing a apr_pollcb_create_ex() crash in one of the fall-back paths which was reported by Neil Conway git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@836105 13f79535-47bb-0310-9956-ffa450edef68
* merge r836091 from trunk:trawick2009-11-141-2/+8
| | | | | | | | | | | | Check that an event was actually filled in when port_getn() returns -1/EINTR with nget > 0. This resolves a crash when receiving a signal. PR: 48030 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@836098 13f79535-47bb-0310-9956-ffa450edef68
* merge r834136 from trunk:trawick2009-11-141-1/+1
| | | | | | | | | | | | | | | | | fix pollcb hangs on Solaris when using Event Ports passing nget=n will block until n events are available (or timeout/signal occurs) possible future optimization: in order to retrieve 1 or more events, first call port_getn() with nget=0 to find out how many events are available, then call it again with the number available git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@836096 13f79535-47bb-0310-9956-ffa450edef68
* merge r829789 from trunk:trawick2009-10-261-1/+4
| | | | | | | | | | | | | | | Work around bogus return code in some circumstances with 32-bit port_getn() on Solaris 10 x86. AFAICT this problem only occurs when the return code should be zero, so changing the return code check should be sufficient. APR 1.3.8 wasn't affected. PR: 48029 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@829801 13f79535-47bb-0310-9956-ffa450edef68
* Finish backport of poll changes from trunk.jim2009-10-022-0/+513
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@821200 13f79535-47bb-0310-9956-ffa450edef68
* Backport all poll changes from r734707 up to nowjim2009-10-026-1043/+706
| | | | | | | from trunk. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@821199 13f79535-47bb-0310-9956-ffa450edef68
* bypass v. weird warningjim2009-09-171-1/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@816362 13f79535-47bb-0310-9956-ffa450edef68
* backport r807263 from trunk:trawick2009-08-241-52/+60
| | | | | | | | | | Fix an error handling issue in the Event Port backend for APR pollsets. (ETIME is sometimes reported along with an event.) PR: 47645 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@807265 13f79535-47bb-0310-9956-ffa450edef68
* backport the following relatively simple Event Port fixes from trunk:trawick2009-08-201-54/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r749049 commentary, consistency, simplification, and minor fixes impl_pollset_create(): . return the actual port_create() failure instead of APR_ENOMEM impl_pollset_add(): . return the actual port_associate() failure instead of APR_ENOMEM impl_pollset_poll(): . catch port_associate() failures . don't report returned events to caller unless something popped besides the wakeup pipe impl_pollcb_poll(): . fix incorrect mapping of EINTR onto APR_TIMEUP . don't hide interesting error codes behind APR_EGENERAL generally: . axe redundant APR_RING_EMPTY() invocations . don't check for EINTR explicitly, as it is handled appropriately by the apr_get_netos_error() invocation (IOW, EINTR == APR_EINTR here) r749490 (only the port.c portion) pollset tweaks: axe logic to set ignored conditions in the poll request structures (these conditions are return-only and are always reported when they occur) r750279 don't lose track of a ring element when port_associate() fails r754294 (only the port.c portion) nelts, the number of elements in the pollset, was neither needed nor properly maintained by these implementations, so axe the related code Additional, more complex fixes only in trunk at this point: r750277, r750708, r750744 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@806150 13f79535-47bb-0310-9956-ffa450edef68
* Backport r747990, r748361, r748371, r748565, r748988, r749810, r783958bojan2009-06-123-1/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | from the trunk. Set CLOEXEC flags where appropriate. Either use new O_CLOEXEC flag and associated functions, such as dup3(), accept4(), epoll_create1() etc., or simply set CLOEXEC flag using fcntl(). Patch by Stefan Fritsch <sf sfritsch.de> and Arkadiusz Miskiewicz <arekm pld-linux.org>. PR 46425. fix unused variable warning for builds without HAVE_DUP3 Unroll APR_SET_FD_CLOEXEC macro. * One missing unroll of APR_SET_FD_CLOEXEC. Document CLOEXEC patch. Only set CLOEXEC on dup() if both NOCLEANUP and INHERIT flags are clear. Retain the INHERIT/NOCLEANUP flags of new_file in apr_file_dup2(). Patch by Stefan Fritsch <sf sfritsch.de>. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@783970 13f79535-47bb-0310-9956-ffa450edef68
* Fix core on win32 when using wakeable pollsetmturk2009-02-121-0/+17
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@743730 13f79535-47bb-0310-9956-ffa450edef68
* Backport r742921 from trunkmturk2009-02-121-1/+6
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@743721 13f79535-47bb-0310-9956-ffa450edef68
* Merge r734707 from trunk:trawick2009-01-211-1/+1
| | | | | | | | | suppress gcc's warning about unexpected assignmet "gcc version 4.0.1 (Apple Inc. build 5490)" git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@736310 13f79535-47bb-0310-9956-ffa450edef68
* Win32: Do not error out on apr_pollset_poll() when there are no sockets.jerenkrantz2008-08-281-0/+11
| | | | | | | | | | * poll/unix/select.c (apr_pollset_poll): On Win32, short-circuit success if we have no sockets instead of returning an error. * CHANGES: Update. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@689896 13f79535-47bb-0310-9956-ffa450edef68
* Fix solaris poll bug - ref http://marc.info/?t=121438277000004&r=1&w=2niq2008-06-271-1/+9
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@672344 13f79535-47bb-0310-9956-ffa450edef68
* * Fix some gcc compiler warnings on Solarisrpluem2008-06-041-1/+1
| | | | | | | Patch to atomic/unix/solaris.c submitted by: Henry Jen <henryjen ztune.net> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@663342 13f79535-47bb-0310-9956-ffa450edef68
* silence warning about assignment expressionfielding2008-05-101-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@655138 13f79535-47bb-0310-9956-ffa450edef68
* Fix incomplete patch in r653953niq2008-05-071-0/+3
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@654046 13f79535-47bb-0310-9956-ffa450edef68
* Fix poll failure on Solaris - PR 43000niq2008-05-061-7/+28
| | | | | | | Patch by Henry Jen git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@653953 13f79535-47bb-0310-9956-ffa450edef68
* Fix typo in r649830niq2008-05-041-2/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@653232 13f79535-47bb-0310-9956-ffa450edef68
* * Silence a compiler warning.rpluem2008-04-291-2/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@652085 13f79535-47bb-0310-9956-ffa450edef68
* Return APR_EINTR only there was no additional descriptors signaled at the ↵mturk2008-04-215-24/+12
| | | | | | time of wakeup call git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@650118 13f79535-47bb-0310-9956-ffa450edef68
* Introduce (again) apr_pollset_wakeup APImturk2008-04-195-65/+564
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@649830 13f79535-47bb-0310-9956-ffa450edef68
* Revert r47540mturk2008-04-135-325/+29
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@647562 13f79535-47bb-0310-9956-ffa450edef68
* Introduce apr_pollset_wakeup()mturk2008-04-135-29/+325
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@647540 13f79535-47bb-0310-9956-ffa450edef68
* PR 42580 - fix return value when apr_pollset_poll interruptedniq2008-03-271-6/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@641661 13f79535-47bb-0310-9956-ffa450edef68
* Solaris Event Ports backend for apr_pollcb. Also fixes the testpoll linkdavi2007-07-031-0/+130
| | | | | | | errors on Solaris due to undefined symbols (apr_pollcb_* functions). git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@552989 13f79535-47bb-0310-9956-ffa450edef68
* Fix nsec timeout valuewrowe2007-04-131-1/+1
| | | | | | | | PR: 42093 Reported by: Alex Kiernan <alex.kiernan gmail.com> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@528659 13f79535-47bb-0310-9956-ffa450edef68
* Stub out the apr_pollcb API for poll & select, always returning APR_ENOTIMPL.pquerna2007-02-202-0/+58
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@509637 13f79535-47bb-0310-9956-ffa450edef68
* Improve returned errors from kevent/kqueue by using apr_get_netos_error() ↵pquerna2007-02-191-3/+3
| | | | | | rather than just returning a hard coded error. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@509039 13f79535-47bb-0310-9956-ffa450edef68
* Add the apr_pollcb API.pquerna2007-02-192-0/+278
| | | | | | | | | | | | This was mostly sitting in the pollcb-dev branch for several months at: <https://svn.apache.org/repos/asf/apr/apr/branches/pollcb-dev/> This commit has small improvements over the branch, and also includes a KQueue backend. This will likely break trunk for operating systems were we only have select|poll, so we will need to add some autoconf foo to define a HAVE_APR_POLLCB unless someone can implement apr_pollcb for all platforms. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@509038 13f79535-47bb-0310-9956-ffa450edef68
* reverting rev 500321 pending investigation of problem reported by jorton. gregames2007-01-291-3/+11
| | | | | | | | | | This line, and those below, will be ignored-- M include/arch/unix/apr_arch_poll_private.h M poll/unix/epoll.c git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@501085 13f79535-47bb-0310-9956-ffa450edef68
* apr_pollset_remove: speed up the httpd Event MPM when lots of connections aregregames2007-01-261-11/+3
| | | | | | | | | | in use epoll/Linux only for now. ./buildconf on FreeBSD (minotaur) spewed tons of errors; hints appreciated git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@500321 13f79535-47bb-0310-9956-ffa450edef68
* Fix bug in pollset creation error checking.rooneg2006-10-091-1/+1
| | | | | | | | | | | | Submitted by: Larry Cipriani <lvc lucent.com> * poll/unix/port.c (apr_pollset_create): Fix typo in error checking for mutex creation. * CHANGES: Consolidate entries for the pollset typo fixes. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@454403 13f79535-47bb-0310-9956-ffa450edef68
* Fix error checking in epoll version of apr_pollset_create.rooneg2006-10-091-1/+1
| | | | | | | | | | | | | Submitted by: Larry Cipriani <lvc lucent.com> * poll/unix/epoll.c (apr_pollset_create): Fix bug in precedence in error checking for mutex creation. * CHANGES: Note change. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@454400 13f79535-47bb-0310-9956-ffa450edef68
* Fix PR 40662.rooneg2006-10-031-1/+1
| | | | | | | | | | | | Submitted by: Larry Cipriani <lvc lucent.com> * poll/unix/kqueue.c (apr_pollset_create): Fix error checking. * CHANGES: Note change. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@452527 13f79535-47bb-0310-9956-ffa450edef68
* Fix the conversion of the timeout paremeter into a timespce for the kqueue ↵pquerna2006-09-021-1/+1
| | | | | | | | | pollset backend. Submitted by: Marco Molteni <mmolteni cisco.com> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@439667 13f79535-47bb-0310-9956-ffa450edef68
* Fix the typo.jorton2006-08-037-7/+7
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@428317 13f79535-47bb-0310-9956-ffa450edef68
* Update license header.jorton2006-08-037-42/+42
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@428313 13f79535-47bb-0310-9956-ffa450edef68
* Zero out the epoll_event structure, to make valgrind stop complaining about ↵pquerna2006-04-051-1/+1
| | | | | | | | | an unitialized read. Noticed by: Davi Arnaut <davi.arnaut gmail.com> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@391696 13f79535-47bb-0310-9956-ffa450edef68
* Fix a longstanding missunderstanding in our kqueue pollset code. It turnsrooneg2006-03-151-2/+2
| | | | | | | | | | | | | | | | | | | out that the kqueue filter types are not bitfields, so checking for them via & EVFILT_READ or & EVFILT_WRITE is inappropriate. Test Fixes By: Joe Orton * poll/unix/kqueue.c (get_kqueue_revent): Use == instead of & when testing for filter types. * test/testpoll.c (multi_event_pollset): Handle the fact that we can sometimes get multiple events for a single socket. * CHANGES: Note fix. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@386154 13f79535-47bb-0310-9956-ffa450edef68
* Correctly compute number of signalled descriptors in the select(2)-basedbrianp2005-11-261-0/+4
| | | | | | | | implementation of apr_poll() when one or more descriptors has multiple events (e.g., is both readable and writable). git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@349070 13f79535-47bb-0310-9956-ffa450edef68
* Bugfix for apr_pollset_poll() on systems that implement pollsetsbrianp2005-11-231-0/+1
| | | | | | | | | | using select(2): properly compute the number of signalled desciptors when one or more of them are both readable and writable. Submitted by: Dror Shilo <Dror.Shilo@ericom.com>, Gerry <gerry@everythingsucks.co.uk> Reviewed by: Brian Pane git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@348499 13f79535-47bb-0310-9956-ffa450edef68
* Added an optional APR_POLLSET_NOCOPY flag for apr_pollset_create().brianp2005-10-231-47/+74
| | | | | | | | | | | | | | | | | | | | | This flag prevents the pollset implementation from making an internal copy of the descriptor object passed to apr_pollset_add(). Instead, a pointer to the descriptor itself is registered as the client_data for the underlying poll mechanism. This saves the cost of a copy, and in the case of the epoll-based implementation it eliminates the O(n)-time loop that's otherwise needed in apr_pollset_remove() to find and free the structure that contains a copy of the descriptor. Note that, when an application creates a pollset using APR_POLLSET_NOCOPY, the application must ensure that all descriptors passed to apr_pollset_add() have sufficiently long lifetimes. With this commit, the epoll-based implementation of apr_pollset implements the APR_POLLSET_NOCOPY optimization. The kqueue-based implementation would benefit from the same optimization. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@327756 13f79535-47bb-0310-9956-ffa450edef68