summaryrefslogtreecommitdiff
path: root/poll
Commit message (Collapse)AuthorAgeFilesLines
* Backport this from apr 1.0-dev:trawick2004-04-101-0/+12
| | | | | | | | | | | Return an error instead of silently failing when apr_poll() is used with file descriptors >= FD_SETSIZE. (Unix systems with no native poll()) Submitted by: Jeff Trawick, Brad Nicholes git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/APR_0_9_BRANCH@65052 13f79535-47bb-0310-9956-ffa450edef68
* Relicense APR under Apache License, Version 2.0.jerenkrantz2004-02-134-196/+40
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/APR_0_9_BRANCH@64903 13f79535-47bb-0310-9956-ffa450edef68
* rename apr_arch_fileio.h to apr_arch_file_io.h for consistencythommay2003-01-072-2/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64275 13f79535-47bb-0310-9956-ffa450edef68
* Namespace protection for include/arch/ header filesthommay2003-01-064-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | aix/dso.h -> -> aix/apr_arch_dso.h beos/dso.h -> beos/apr_arch_dso.h beos/proc_mutex.h -> beos/apr_arch_proc_mutex.h beos/thread_cond.h -> beos/apr_arch_thread_cond.h beos/thread_mutex.h -> beos/apr_arch_thread_mutex.h beos/threadproc.h -> beos/apr_arch_threadproc.h beos/thread_rwlock.h -> beos/apr_arch_thread_rwlock.h netware/dso.h -> -> netware/apr_arch_dso.h netware/fileio.h -> -> netware/apr_arch_fileio.h netware/global_mutex.h -> netware/apr_arch_global_mutex.h netware/internal_time.h -> netware/apr_arch_internal_time.h netware/networkio.h -> netware/apr_arch_networkio.h netware/pre_nw.h -> netware/apr_arch_pre_nw.h netware/proc_mutex.h -> netware/apr_arch_proc_mutex.h netware/thread_cond.h -> netware/apr_arch_thread_cond.h netware/thread_mutex.h -> netware/apr_arch_thread_mutex.h netware/threadproc.h -> netware/apr_arch_threadproc.h netware/thread_rwlock.h -> netware/apr_arch_thread_rwlock.h os2/dso.h -> os2/apr_arch_dso.h os2/fileio.h -> os2/apr_arch_fileio.h os2/networkio.h -> os2/apr_arch_networkio.h os2/os2calls.h -> os2/apr_arch_os2calls.h os2/proc_mutex.h -> os2/apr_arch_proc_mutex.h os2/thread_cond.h -> os2/apr_arch_thread_cond.h os2/thread_mutex.h -> os2/apr_arch_thread_mutex.h os2/threadproc.h -> os2/apr_arch_threadproc.h os2/thread_rwlock.h -> os2/apr_arch_thread_rwlock.h os390/dso.h -> os390/apr_arch_dso.h unix/dso.h -> unix/apr_arch_dso.h unix/fileio.h -> unix/apr_arch_fileio.h unix/global_mutex.h -> unix/apr_arch_global_mutex.h unix/inherit.h -> unix/apr_arch_inherit.h unix/internal_time.h -> unix/apr_arch_internal_time.h unix/misc.h -> unix/apr_arch_misc.h unix/networkio.h -> unix/apr_arch_networkio.h unix/proc_mutex.h -> unix/apr_arch_proc_mutex.h unix/shm.h -> unix/apr_arch_shm.h unix/thread_cond.h -> unix/apr_arch_thread_cond.h unix/thread_mutex.h -> unix/apr_arch_thread_mutex.h unix/threadproc.h -> unix/apr_arch_threadproc.h unix/thread_rwlock.h -> unix/apr_arch_thread_rwlock.h win32/atime.h -> win32/apr_arch_atime.h win32/dso.h -> win32/apr_arch_dso.h win32/fileio.h -> win32/apr_arch_fileio.h win32/inherit.h -> win32/apr_arch_inherit.h win32/misc.h -> win32/apr_arch_misc.h win32/networkio.h -> win32/apr_arch_networkio.h win32/proc_mutex.h -> win32/apr_arch_proc_mutex.h win32/thread_cond.h -> win32/apr_arch_thread_cond.h win32/thread_mutex.h -> win32/apr_arch_thread_mutex.h win32/threadproc.h -> win32/apr_arch_threadproc.h win32/thread_rwlock.h -> win32/apr_arch_thread_rwlock.h win32/utf8.h -> win32/apr_arch_utf8.h git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64271 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: In apr_pollset_poll(), set the num value to 0 on error or time out.bjh2003-01-041-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64268 13f79535-47bb-0310-9956-ffa450edef68
* Simplify select-based apr_poll to avoid an extra for loop and clearjorton2003-01-031-4/+2
| | | | | | | rtnevents whilst building the fd_set. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64262 13f79535-47bb-0310-9956-ffa450edef68
* fix the clearing of the pollset in the select-based implementationbrianp2003-01-031-3/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64261 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright notices to 2003.thommay2003-01-014-4/+4
| | | | | | | No functional changes git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64251 13f79535-47bb-0310-9956-ffa450edef68
* Fix apr_poll behavior on Darwin/Win32 (now passing testpoll.)wrowe2002-12-311-0/+4
| | | | | | | | | | | We were getting spurious returned events because the select-based poll implementation wasn't zeroing out previous results before setting the current ones and returning. Submitted by: Garrett Rooney <rooneg@electricjellyfish.net> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64241 13f79535-47bb-0310-9956-ffa450edef68
* I forgot the ;.rbb2002-12-241-1/+1
| | | | | | | Submitted by: Ben Laurie <ben@algroup.co.uk> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64207 13f79535-47bb-0310-9956-ffa450edef68
* Fix an infinite loop in apr_poll_socket_clear.rbb2002-12-241-0/+1
| | | | | | | Submitted by: INOUE Seiichiro <inoue@ariel-networks.com> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64206 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Implement apr_pollset_*()bjh2002-09-261-5/+159
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63884 13f79535-47bb-0310-9956-ffa450edef68
* include <alloca.h> on any system that has it, not just on Tru64trawick2002-09-201-2/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63879 13f79535-47bb-0310-9956-ffa450edef68
* Include alloca.h on Tru64 to ensure that alloca gets redefined tobrianp2002-09-091-0/+4
| | | | | | | | a version that works properly with threads Submitted by: David Hill [ddhill@zk3.dec.com] git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63854 13f79535-47bb-0310-9956-ffa450edef68
* Bugfix for apr_pollset_remove()brianp2002-09-011-0/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63843 13f79535-47bb-0310-9956-ffa450edef68
* Cleaned up the code for handling invalid descriptor types in apr_pollbrianp2002-08-111-7/+9
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63805 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Add APR_ENOTIMPL stubs for apr_pollset_*() functions so that we canbjh2002-08-092-0/+105
| | | | | | | still build before I find time to implement them properly. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63803 13f79535-47bb-0310-9956-ffa450edef68
* Changed apr_poll_socket_remove() and apr_poll() to avoidbrianp2002-08-072-3/+28
| | | | | | | | | putting invalid descriptors on the pollset after removing from the middle of the array Reported by: Rob Saccoccio <robs@fastcgi.com> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63801 13f79535-47bb-0310-9956-ffa450edef68
* Set the result array in the select-based version of apr_pollset_poll()brianp2002-08-061-0/+1
| | | | | | | Submitted by: Rob Saccoccio <robs@fastcgi.com> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63797 13f79535-47bb-0310-9956-ffa450edef68
* One more update to the pollset API before we start using itbrianp2002-08-041-1/+2
| | | | | | | | | | | | | | | in the httpd: add a "flags" argument to apr_pollset_create(). When we add support for OS-specific poll alternatives in the future, I anticipate that we'll need to give apps a way to pass hints to the pollset create function to help it pick the best mechanism for a specific pollset. (E.g., there may be situations where we'll want to use poll(2) even if the OS has /dev/poll.) This "flags" argument is a placeholder to make it possible to add such hints later. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63790 13f79535-47bb-0310-9956-ffa450edef68
* apr_get_netos_error() must be implemented on all platforms. Aren'twrowe2002-08-041-4/+4
| | | | | | | | | | | you unix folks already having trouble with h_errno v.s. errno? Fix apr_poll to use apr_get_netos_error(). Submitted by: Rob Saccoccio <robs@fastcgi.com> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63787 13f79535-47bb-0310-9956-ffa450edef68
* On systems without poll, limit apr_pollset's capacity tobrianp2002-08-031-0/+6
| | | | | | | | the number of descriptors that select can handle (this is why testpoll test #4 was failing on win32) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63779 13f79535-47bb-0310-9956-ffa450edef68
* NetWare can't handle mixed descriptor sets. Added code to make sure thatbnicholes2002-08-021-4/+55
| | | | | | | the set contain only socket or pipe descriptors. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63777 13f79535-47bb-0310-9956-ffa450edef68
* fix a compile break on stock FreeBSD 3.4 (gcc 2.7.2.3)trawick2002-08-021-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63775 13f79535-47bb-0310-9956-ffa450edef68
* Features, not platforms, correct?wrowe2002-08-021-6/+6
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63774 13f79535-47bb-0310-9956-ffa450edef68
* Cleanup the last emit ... one final fd-as-socket problem.wrowe2002-08-021-0/+4
| | | | | | | These should really become HAVE_FILES_AS_SOCKETS or some other macro git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63773 13f79535-47bb-0310-9956-ffa450edef68
* We safely ignore palloc failures [we can segv in the allocator].wrowe2002-08-021-0/+8
| | | | | | | We cannot ignore alloca/malloc failures. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63771 13f79535-47bb-0310-9956-ffa450edef68
* use apr_os_sock_t for socket descriptor variablesbrianp2002-08-021-26/+7
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63770 13f79535-47bb-0310-9956-ffa450edef68
* Remove the memory leak from the apr_poll implementation. On all systems,rbb2002-08-021-9/+16
| | | | | | | | | | this will support any number of files/sockets. On modern systems, this will allocate on the stack. On older systems we fall back to malloc/free. Note: We will rarely ever use malloc/free. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63769 13f79535-47bb-0310-9956-ffa450edef68
* more win32 socket descriptor signedness fixesbrianp2002-08-021-5/+5
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63763 13f79535-47bb-0310-9956-ffa450edef68
* One more fix for socket/file incompatibility on win32brianp2002-08-021-1/+5
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63761 13f79535-47bb-0310-9956-ffa450edef68
* Avoid trying to turn file handles into sockets on win32 (wherebrianp2002-08-021-2/+14
| | | | | | | they're not interchangeable) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63760 13f79535-47bb-0310-9956-ffa450edef68
* c/unsigned int/SOCKET/ for win32ianh2002-08-021-0/+20
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63759 13f79535-47bb-0310-9956-ffa450edef68
* Remove some assumptions about file descriptors being integersbrianp2002-08-021-21/+27
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63757 13f79535-47bb-0310-9956-ffa450edef68
* Added select-based pollset implementation for systems without pollbrianp2002-08-011-3/+137
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63756 13f79535-47bb-0310-9956-ffa450edef68
* Added general-purpose pollset API to handle arbitrarily largebrianp2002-08-011-0/+113
| | | | | | | numbers of file descriptors git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63755 13f79535-47bb-0310-9956-ffa450edef68
* Use storage on the stack instead of apr_palloc in apr_poll()brianp2002-07-311-6/+18
| | | | | | | | | | | | when the number of descriptors is small (Note: The poll API still needs a rewrite in order to be usable with large numbers of descriptors. This change is just a short-term hack to work around the memory leak that apr_poll() was causing in the httpd.) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63745 13f79535-47bb-0310-9956-ffa450edef68
* NetWare uses a different select() call if the handle is pipe rather than a ↵bnicholes2002-07-161-0/+17
| | | | | | socket. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63692 13f79535-47bb-0310-9956-ffa450edef68
* Nuke a warning due to a function that should have been static AFAICT:jwoolley2002-07-161-1/+1
| | | | | | | pollacc.c:78: warning: no previous prototype for `find_poll_sock' git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63686 13f79535-47bb-0310-9956-ffa450edef68
* Eliminate the one Unix emit, and one of three Win32 emits.wrowe2002-07-151-2/+2
| | | | | | | | | | | The other two Win32 emits, setting the des from filedes/socketdes [HANDLE -> int] shouldn't be cast around, and we will likely move this code from poll/unix anyways. The other emit, FD_SET errors, are gone in the latest win32 clib implementations, and again, our own win32 platform code will evaporate those problems. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63681 13f79535-47bb-0310-9956-ffa450edef68
* Fix socket counts after a socket has been removed from the poll set.bjh2002-07-131-3/+5
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63651 13f79535-47bb-0310-9956-ffa450edef68
* Macroized... but no macroswrowe2002-07-131-0/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63649 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: rewrite apr_poll() with the new interface.bjh2002-07-112-104/+71
| | | | | | | | There's probably room for optimization here but this at least gets us going again & passes testpoll. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63613 13f79535-47bb-0310-9956-ffa450edef68
* Split the apr_poll() implementation from the accessor functions. Thisrbb2002-07-115-112/+180
| | | | | | | | | allows all platforms to use the same implementation for the accessor functions. Submitted by: Brian Havard git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63611 13f79535-47bb-0310-9956-ffa450edef68
* get the new poll code to build on AIX, which for 32-bit builds has sometrawick2002-07-111-10/+10
| | | | | | | | extremely unfortunate macros in <sys/poll.h> that play with "events" and "revents" via #define git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63610 13f79535-47bb-0310-9956-ffa450edef68
* ignore generated filestrawick2002-07-111-0/+4
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63609 13f79535-47bb-0310-9956-ffa450edef68
* fix an apparent bug in the select() implementation of apr_poll()trawick2002-07-111-1/+1
| | | | | | | (untested) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63608 13f79535-47bb-0310-9956-ffa450edef68
* Get Win32 building again. Doesn't build clean, but at least it builds.wrowe2002-07-111-10/+10
| | | | | | | | | poll on win32 may or may not work correctly, but then again, I don't believe that httpd needs it at this moment. Not blasting win32's poll until coders are done with it. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63604 13f79535-47bb-0310-9956-ffa450edef68
* An attempt at the OS/2 implementation. I have no OS/2 box, so thisrbb2002-07-112-0/+193
| | | | | | | | | probably won't work, but at least it is a start. My only question is can you select on a file descriptor on OS/2? If not, then we will just have to return an error on OS/2 if somebody tries to. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63603 13f79535-47bb-0310-9956-ffa450edef68
* Reimplement apr_poll() on Unix. This improves performance by giving therbb2002-07-112-0/+354
user back control over the memory in the pollset. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63601 13f79535-47bb-0310-9956-ffa450edef68