summaryrefslogtreecommitdiff
path: root/poll
Commit message (Collapse)AuthorAgeFilesLines
...
* no functional change, whitespace only. remove trailing blanksGreg Ames2013-01-171-65/+65
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1434858 13f79535-47bb-0310-9956-ffa450edef68
* give John Brooks credit for his design, but don't feed hisGreg Ames2013-01-081-1/+2
| | | | | | | email to the spammers git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1430410 13f79535-47bb-0310-9956-ffa450edef68
* fix this gcc warning:Jeff Trawick2012-08-121-0/+1
| | | | | | | | poll/unix/pollcb.c: In function 'pollcb_provider': poll/unix/pollcb.c:47:5: warning: enumeration value 'APR_POLLSET_AIO_MSGQ' not handled in switch git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1372197 13f79535-47bb-0310-9956-ffa450edef68
* z/OS "threadsafe" apr_pollset_poll depends on async i/o feeding anGreg Ames2012-04-132-8/+8
| | | | | | | | IPC message queue. Create a configure test for that combo and test it elsewhere. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1325944 13f79535-47bb-0310-9956-ffa450edef68
* qualify another HAVE_AIO_H referenceGreg Ames2012-04-031-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1308950 13f79535-47bb-0310-9956-ffa450edef68
* one more HAVE_AIO_H that is intented for z/OS onlyGreg Ames2012-04-031-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1308938 13f79535-47bb-0310-9956-ffa450edef68
* apr buildbot is dying trying to compile z/OS unique source. apparently it Greg Ames2012-04-031-2/+2
| | | | | | | found an aio.h header file. add a test for the intended platform too. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1308923 13f79535-47bb-0310-9956-ffa450edef68
* support for thread-hopping apr_pollset_* using z/OS async i/o. Greg Ames2012-04-032-0/+749
| | | | | | | no support for apr_pollcb yet. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1308910 13f79535-47bb-0310-9956-ffa450edef68
* fix variable initialization bug in r1089433Jeff Trawick2011-04-061-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1089528 13f79535-47bb-0310-9956-ffa450edef68
* poll, pollset, pollcb on Windows: Handle calls with no file/socketJeff Trawick2011-04-062-0/+32
| | | | | | | | | | | descriptors. PR: 49882 Patch for one situation submitted by: Stefan Ruppert <sr myarm.com> Extended by: trawick git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1089433 13f79535-47bb-0310-9956-ffa450edef68
* don't override parameter 'flags' within a blockJeff Trawick2011-03-291-8/+8
| | | | | | | (icc complains, I sympathize) git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1086692 13f79535-47bb-0310-9956-ffa450edef68
* disable entire impl_pollcb_create() function if APR_HAS_THREADSJeff Trawick2010-08-201-2/+2
| | | | | | | instead of just inserting a return at the top git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@987639 13f79535-47bb-0310-9956-ffa450edef68
* apr_pollset_create_ex(): Trap errors from pollset providers.Jeff Trawick2010-04-121-0/+3
| | | | | | | | | PR: 49094 Submitted by: Sami Tolvanen <sami.tolvanen mywot.com> Reviewed by: trawick git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@933271 13f79535-47bb-0310-9956-ffa450edef68
* fix misuse of autodata in initialization of the wakeupJeff Trawick2010-04-091-4/+2
| | | | | | | | | | pipe when the pollset was created with APR_POLLSET_NOCOPY Submitted by: Neil Conway <nrc cs.berkeley.edu> Reviewed by: trawick git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@932585 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Implement pollcb API. As we don't have any advanced features like kqueueBrian Havard2010-03-151-0/+96
| | | | | | | or similar, this is just a wrapper for a pollset. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@923329 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Protect against NULL dereference if apr_pollset_wakeup() is called for aBrian Havard2010-03-151-2/+6
| | | | | | | non-wakeable pollset. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@923320 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Implement apr_pollset_wakeup() using a unix domain socket.Brian Havard2010-03-151-6/+86
| | | | | | | Also adds stubs for apr_poll_method_defname() and apr_pollset_method_name(). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@923311 13f79535-47bb-0310-9956-ffa450edef68
* add namespace protection forJeff Trawick2010-01-228-24/+26
| | | | | | | | | | | | * create_wakeup_pipe() * close_wakeup_pipe() * drain_wakeup_pipe() use generic apr_poll_ since these are used from both apr_pollset_ and apr_pollcb_ git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@902090 13f79535-47bb-0310-9956-ffa450edef68
* fix compile failure in pollcb wakeup logic on Solaris >= 10Jeff Trawick2010-01-221-3/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@902077 13f79535-47bb-0310-9956-ffa450edef68
* fix missing semicolonWilliam A. Rowe Jr2010-01-201-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@901088 13f79535-47bb-0310-9956-ffa450edef68
* * Add apr_pollcb_wakeup(), with similar behavior toGraham Leggett2010-01-168-167/+273
| | | | | | | | | | | | | | | | | apr_pollset_wakeup(). Along the way, refactor the code for creating/managing the wakeup pipe to a separate file, wakeup.c * Add apr_pollcb_method_name(), with similar behavior to apr_pollset_method_name() * Add minimal unit tests for apr_pollset_wakeup() and apr_pollcb_wakeup() apr_pollcb_wakeup() is supported with all the poll methods supported by pollcb (kqueue, epoll, poll, and event ports). Submitted by: Neil Conway <nrc@cs.berkeley.edu> git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@899905 13f79535-47bb-0310-9956-ffa450edef68
* * Add missing declarations.Ruediger Pluem2009-12-211-0/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@892718 13f79535-47bb-0310-9956-ffa450edef68
* Add result valuesWilliam A. Rowe Jr2009-12-181-4/+9
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@892393 13f79535-47bb-0310-9956-ffa450edef68
* refactor for what is meant to strictly be internal functionality for 1 ↵William A. Rowe Jr2009-12-181-32/+38
| | | | | | platform, move declarations out of .c sources git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@892386 13f79535-47bb-0310-9956-ffa450edef68
* Check that an event was actually filled in whenJeff Trawick2009-11-141-2/+8
| | | | | | | | | | | port_getn() returns -1/EINTR with nget > 0. This resolves a crash when receiving a signal. PR: 48030 git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@836091 13f79535-47bb-0310-9956-ffa450edef68
* fix pollcb hangs on Solaris when using Event PortsJeff Trawick2009-11-091-1/+1
| | | | | | | | | | | | | | 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: https://svn.apache.org/repos/asf/apr/apr/trunk@834136 13f79535-47bb-0310-9956-ffa450edef68
* fix special poll() processing on Win32 to be consistentJeff Trawick2009-11-092-16/+22
| | | | | | | | | | between . apr_{pollset|pollcb}_create_ex(..., APR_POLLSET_DEFAULT) and . apr_{pollset|pollcb}_create(...) git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@834040 13f79535-47bb-0310-9956-ffa450edef68
* apr_pollset_create_ex(), apr_pollcb_create_ex():Jeff Trawick2009-11-092-28/+30
| | | | | | | | | 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: https://svn.apache.org/repos/asf/apr/apr/trunk@834029 13f79535-47bb-0310-9956-ffa450edef68
* Work around bogus return code in some circumstances with 32-bit Jeff Trawick2009-10-261-1/+4
| | | | | | | | | | | | | | 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: https://svn.apache.org/repos/asf/apr/apr/trunk@829789 13f79535-47bb-0310-9956-ffa450edef68
* Fix an error handling issue in the Event Port backend for APR pollsets.Jeff Trawick2009-08-241-52/+60
| | | | | | | | | | (ETIME is sometimes reported along with an event.) PR: 47645 git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@807263 13f79535-47bb-0310-9956-ffa450edef68
* Remove stray semicolon in OS/2 version of apr_pollset_create_ex() that ↵Brian Havard2009-08-141-1/+1
| | | | | | breaks the build. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@804160 13f79535-47bb-0310-9956-ffa450edef68
* For poll() backend of pollcb API, return ENOTIMPL if APR was compiled with ↵Paul Querna2009-07-051-0/+4
| | | | | | threads. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@791333 13f79535-47bb-0310-9956-ffa450edef68
* If APR_POLLSET_NODEFAULT is specified, never ever fallback to the default.Paul Querna2009-06-281-3/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@789066 13f79535-47bb-0310-9956-ffa450edef68
* fix crash in poll() implementation of pollcb APIJeff Trawick2009-06-051-0/+1
| | | | | | | (This is apparently a trunk-only bug.) git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@781884 13f79535-47bb-0310-9956-ffa450edef68
* nelts, the number of elements in the pollset, was neither needed Jeff Trawick2009-03-163-4/+0
| | | | | | | | nor properly maintained by these implementations, so axe the related code git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@754924 13f79535-47bb-0310-9956-ffa450edef68
* fix a race condition between pollset_poll and pollset_removeJeff Trawick2009-03-061-5/+22
| | | | | | | | | | | | | | | | T1: port_getn called from pollset_poll T2: pollset_remove called for fd X T2: obtains ring lock T1: port_getn returns event for fd X, kernel disassociates from port T1: blocks on ring lock T2: moves ring element for fd X from query ring to dead ring T2: releases ring lock T1: obtains ring lock T1: moves ring element for fd X to add ring, assuming still on query ring git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@750744 13f79535-47bb-0310-9956-ffa450edef68
* elements on the add ring are not currently associated, so only call Jeff Trawick2009-03-061-11/+11
| | | | | | | | | | | | | port_dissociate (sic) if it isn't on the add ring when we remove an element from the add ring, we can release it immediately to the free ring (elements removed from the query ring are the ones that have to be placed on the dead ring temporarily) git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@750708 13f79535-47bb-0310-9956-ffa450edef68
* don't lose track of a ring element when port_associate() failsJeff Trawick2009-03-051-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@750279 13f79535-47bb-0310-9956-ffa450edef68
* when removing a pollfd, don't search both the add ringJeff Trawick2009-03-051-14/+26
| | | | | | | | | | and the query ring; it can be on only one of them reverse the search order of the two lists, so that we search the (often) shorter/more likelier list first git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@750277 13f79535-47bb-0310-9956-ffa450edef68
* pollset tweaks:Jeff Trawick2009-03-033-20/+3
| | | | | | | | | axe logic to set ignored conditions in the poll request structures (these conditions are return-only and are always reported when they occur) git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@749490 13f79535-47bb-0310-9956-ffa450edef68
* commentary, consistency, simplification, and minor fixesJeff Trawick2009-03-011-44/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | 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) git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@749049 13f79535-47bb-0310-9956-ffa450edef68
* get_kqueue_revent():Jeff Trawick2009-03-011-16/+14
| | | | | | | | | | | | | | tweak the code ever so slightly to highlight a critical kqueue() characteristic: POLLIN and POLLOUT won't be reflected in a single returned event impl_pollset_remove(): axe a redundant invocation of APR_RING_EMPTY() other: trivial tweaks for consistency or readability git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@749025 13f79535-47bb-0310-9956-ffa450edef68
* Don't give the caller the list of returned events unless some event besidesJeff Trawick2009-03-011-3/+4
| | | | | | | the wakeup pipe occurred. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@749023 13f79535-47bb-0310-9956-ffa450edef68
* EV_ERROR doesn't map to APR_POLLERRJeff Trawick2009-03-011-3/+5
| | | | | | | | It might map to APR_POLLNVAL when used in conjunction with other information returned by kevent(). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@749021 13f79535-47bb-0310-9956-ffa450edef68
* Don't return failure or fail to clean up the event queue if the callerJeff Trawick2009-03-011-16/+15
| | | | | | | | overspecifies the conditions (e.g., APR_POLLIN|APR_POLLOUT when checking only for APR_POLLOUT). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@749008 13f79535-47bb-0310-9956-ffa450edef68
* revert a non-critical part of 748951: the needless use of separate temporary ↵Jeff Trawick2009-03-011-10/+9
| | | | | | | | | kevent structures for POLLIN vs. POLLOUT git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@748953 13f79535-47bb-0310-9956-ffa450edef68
* Allow the kqueue pollset implementation to support checking both APR_POLLIN andJeff Trawick2009-03-011-15/+26
| | | | | | | | | | | | | APR_POLLOUT for the same descriptor. This requires separate kevent structures for both conditions. Importantly, if both conditions are present, they will be returned in separate apr_pollfd_t structures with this implementation (to avoid the cycles to coalesce into the minimal number of structures). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@748951 13f79535-47bb-0310-9956-ffa450edef68
* fix compile failure on SolarisJeff Trawick2009-02-281-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@748879 13f79535-47bb-0310-9956-ffa450edef68
* no need to copy descriptors if only the wakeup pipe poppedJeff Trawick2009-02-271-4/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@748684 13f79535-47bb-0310-9956-ffa450edef68
* Unroll APR_SET_FD_CLOEXEC macro.Bojan Smojver2009-02-274-8/+80
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@748371 13f79535-47bb-0310-9956-ffa450edef68