libuv/src/unix
Ben Noordhuis 5fc8aecd81 unix: simplify async watcher dispatch logic
Remove the unused `nevents` parameter from `uv__async_event()`
and remove the indirection of having a separate `uv__async`
type.  There is only one instance per event loop these days.

This incidentally removes the `assert(n == sizeof(val))` in a
Linux-specific code path that some users seem to hit from time
to time.  The cause is not well-understood and I've never been
able to reproduce it myself.  Presumably libuv gets an EAGAIN
when trying to read from the eventfd but when and why that
happens is unclear.

Since the byte count is unused, removing the assert seems safe.
Worst case, libuv sometimes iterates over the async watcher list
when it doesn't have to.

Fixes: https://github.com/libuv/libuv/issues/1171
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Supersedes: https://github.com/libuv/libuv/pull/1214
2017-03-15 10:03:10 +01:00
..
aix.c aix: re-enable fs watch facility 2017-01-30 21:20:10 +01:00
android-ifaddrs.c src: remove non ascii character 2015-12-13 11:52:49 +01:00
async.c unix: simplify async watcher dispatch logic 2017-03-15 10:03:10 +01:00
atomic-ops.h zos: make platform functional 2017-01-18 08:42:59 -06:00
bsd-ifaddrs.c unix: factor out reusable BSD ifaddrs impl 2017-03-14 08:33:43 +01:00
core.c unix: return UV_EINVAL for NULL env name 2017-03-14 08:28:46 +01:00
darwin-proctitle.c unix: fix long line introduced in commit 94e628fa 2015-01-21 13:04:50 +01:00
darwin.c unix: factor out reusable BSD ifaddrs impl 2017-03-14 08:33:43 +01:00
dl.c misc: remove unnecessary null pointer checks 2015-11-17 09:18:55 +01:00
freebsd.c unix: factor out reusable BSD ifaddrs impl 2017-03-14 08:33:43 +01:00
fs.c fs: cleanup uv__fs_scandir 2017-01-17 21:10:43 -06:00
fsevents.c fsevents: fix race on simultaneous init+close 2015-12-02 19:01:28 -05:00
getaddrinfo.c core: add ability to customize memory allocator 2015-06-02 12:05:20 +02:00
getnameinfo.c unix, win: add synchronous uv_get{addr,name}info 2015-01-23 01:12:05 +01:00
internal.h unix: simplify async watcher dispatch logic 2017-03-15 10:03:10 +01:00
kqueue.c unix: delay signal handling until after normal i/o 2016-04-15 12:04:57 +02:00
linux-core.c unix: factor out getifaddrs result filter 2017-03-14 08:33:28 +01:00
linux-inotify.c unix: use POLL{IN,OUT,etc} constants directly 2016-04-11 10:51:13 +02:00
linux-syscalls.c linux,fs: fix p{read,write}v with a 64bit offset 2015-12-03 08:50:28 +01:00
linux-syscalls.h unix: use POLL{IN,OUT,etc} constants directly 2016-04-11 10:51:13 +02:00
loop-watcher.c unix: use QUEUE_MOVE when iterating over lists 2015-10-08 21:47:43 +02:00
loop.c unix: simplify async watcher dispatch logic 2017-03-15 10:03:10 +01:00
netbsd.c unix: factor out reusable BSD ifaddrs impl 2017-03-14 08:33:43 +01:00
openbsd.c unix: factor out reusable BSD ifaddrs impl 2017-03-14 08:33:43 +01:00
os390-syscalls.c zos: make platform functional 2017-01-18 08:42:59 -06:00
os390-syscalls.h zos: make platform functional 2017-01-18 08:42:59 -06:00
os390.c zos: use built-in proctitle implementation 2017-01-27 18:08:28 +01:00
pipe.c zos: track unbound handles and bind before listen 2016-08-24 10:02:41 +01:00
poll.c unix: use uv__is_closing everywhere 2016-11-03 11:11:16 +01:00
posix-hrtime.c unix: factor out reusable POSIX hrtime impl 2017-03-03 15:52:42 +01:00
process.c unix: use async-signal safe functions between fork and exec 2017-01-17 21:29:15 -06:00
proctitle.c zos: use built-in proctitle implementation 2017-01-27 18:08:28 +01:00
pthread-barrier.c unix: move function call out of assert 2017-01-17 21:08:36 -06:00
pthread-fixes.c unix: fix bug in barrier fallback implementation 2016-04-26 09:35:47 +02:00
signal.c signal: add uv_signal_start_oneshot method 2017-02-28 14:16:54 +01:00
spinlock.h unix: add spinlock.h 2013-10-20 13:58:34 +02:00
stream.c unix: use union to follow strict aliasing rules 2017-03-14 08:42:39 +01:00
sunos.c unix: factor out getifaddrs result filter 2017-03-14 08:33:28 +01:00
tcp.c zos: track unbound handles and bind before listen 2016-08-24 10:02:41 +01:00
thread.c unix: don't malloc in uv_thread_create() 2016-10-16 19:28:17 +02:00
timer.c unix: unneccessary use const qualifier in container_of 2016-08-25 22:45:33 +01:00
tty.c build: GNU/kFreeBSD support 2016-08-20 08:55:30 +02:00
udp.c unix: use union to follow strict aliasing rules 2017-03-14 08:42:39 +01:00