| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Remove it to save 8 bytes (on 64 bits arch) when such a struct is allocated.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907751 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
PR: 66408
Submitted by: Sam James <sam gentoo.org>
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1906594 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1905414 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1905392 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
Don't convert timeout to milliseconds before potentially callig apr_sleep().
Tests for "poll() didn't sleep" now use the real timeout as lower limit.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902258 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
When converting appr_interval_time_t (usecs) to system call's msecs, round up.
apr_*poll() calls should wait *at least* the given timeout, not less.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902236 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
* poll/unix/kqueue.c(impl_pollset_add):
Cast to (void *) to "break" constantnes of descriptor.
Follow up to r1902178.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902178 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
job testing under UBSan.
* poll/unix/poll.c (apr_poll): For the on-stack array allocation use
num+1 since allocating a 0-length array is undefined behaviour.
* tables/apr_skiplist.c (get_b_rand): Use unsigned integers to avoid
signed integer overflow in the left shift.
(skiplist_qpush): Avoid calling memcpy(,NULL,0).
* random/unix/apr_random.c (apr_random_add_entropy): Avoid calling
memcpy(,NULL,0).
* test/teststr.c (overflow_strfsize): Avoid signed integer overflow.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1898076 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
Rework win32 poll wakeup implementation:
- Explicitly use apr_socket_t instead of apr_file_t for wakeup `pipe`
- Remove code in win32 apr_file_t implementation that emulates working with
sockets as files. Sockets on Windows are not kernel objects and should be
used only via Winsock API.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1897895 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
EPOLLEXCLUSIVE is 1u << 28 so it doesn't fit in an int16_t, use unsigned for
the native epoll events type.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1897548 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
epoll has EPOLLEXCLUSIVE, start with that.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1897521 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
Like with epoll, it allows to be lockless if the lifetime of the pollfd(s) is
garanteed by the user.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1897520 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1897519 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
| |
Like with epoll, it allows to be lockless if the lifetime of the pollfd(s) is
garanteed by the user.
[Reverted by r1897519]
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1897518 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1895177 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If pipe writers (wakeup) put a single byte until it's consumed by the
reader (drain), it's enough to use an atomic cas for the writers (still) and
an atomic (re)set for the reader (no more cas here).
This requires that the reader never blocks on read though (e.g. spurious return
from poll), so make the read side on the pipe non-blocking again/finally.
Since synchronous non-blocking read is not a thing for Windows' Readfile(), add
a ->socket flag to this arch's apr_file_t (like the existing ->pipe one) which
file_socket_pipe_create() will set to make apr_file_read/write() handle
non-blocking (nor overlapped) socket pipes with WSARecv/Send().
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1895175 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
r1894914.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1895111 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
apr_pollset_wakeup/apr_pollcb_wakeup for the same pollset filling up drain pipe. Use atomics so that wakeup call is noop if some other thread allready done this
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1895106 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1894917 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
apr_poll_drain_wakeup_pipe() can block if exactly 512 bytes (or multiple
thereof) are available on the drained pipe, fix this by setting read end
of the pipe nonblocking (the write end is still blocking).
Submitted by: Mihaly Szjatinya <mihaly.szjatinya nxlog.org>
Reviewed by: ylavic
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1894914 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1860159 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1819935 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1819934 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
This test is redundant now, axe it (no functional change).
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1819861 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
pollset and handling the dead ring, all is simple/fast/nonblocking ops.
Also, set types of "i" and "j" respectively to the ones of nget and *num.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1819860 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
Just like user fds (file, socket), otherwise it's one shot only (PR-61786).
Corresponding test committed in r1819857.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1819858 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
poll/unix/poll/*.c: Constify all apr_pollcb_provider_t and
apr_pollset_provider_t structures.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1805380 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The underlying syscall sanity checks some fields we don't later specify,
possibly even some fields that are n/a for a cancel operation,
which may result in a cancel call failing.
outstanding aysnc I/O requests are cancelled when the fd is closed,
but with very long-lived sockets, failing cancels could result
in elevated CPU during BP4XAIO of type select or cancel.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1759009 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
number of descriptors/events, before the returned descriptors are actually
initialized.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1755758 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
The UNIX socket is SOCK_DGRAM, so draining the pipe is another read()..
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1755746 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
Don't return APR_EINTR (woken up) unless we actually read something on the
wakeup pipe (which we must drain), and also return APR_SUCCESS if at least
some other event is available simultaneously.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1755740 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
would try to zap a random/garbage message queue identifier. In httpd,
this could happen with e.g. mod_cgi's short-lived, non-threadsafe
pollset.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1750374 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
comparison); Clarify expression with parentheses.
PR59582
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1744600 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
and the real event if a real event occurs AND apr_pollset_wakeup()
is called before apr_pollset_poll() is called and/or awakened.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1671513 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
(APR_SUCCESS was returned instead in that scenario.)
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1671389 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1667915 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1667914 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1666341 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
Submitted By: Pat Odonnell <patod us ibm com>
Committed By: covener
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1646891 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1441742 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1438959 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1437607 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1437109 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
* reset the state to ASIO_INIT after finding something that wasn't apr_pollset_remove'd on the prior ready ring
thanks to Pat O'Donnell / IBM for debugging assistance
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1436667 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
cancelling async i/o. this fixes a leak
in USS for every keepalive timeout combined with CPU growth on the httpd listener thread
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1434976 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
* in apr_pollset_remove, don't cancel async i/o if it has already completed
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1434971 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1434941 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
that set it
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1434929 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1434858 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
email to the spammers
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1430410 13f79535-47bb-0310-9956-ffa450edef68
|