diff options
author | Eric Wong <e@80x24.org> | 2019-06-24 02:52:55 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-06-24 05:26:36 +0000 |
commit | df5755b40b4ba1d6048042e18d8ea501755b9a02 (patch) | |
tree | f25a2ac8d90af25e46f7b440073684301a153b1d /lib/PublicInbox/Syscall.pm | |
parent | fbcd2b5eb401a8e1811d803cef9b1c156acb50f6 (diff) | |
download | public-inbox-df5755b40b4ba1d6048042e18d8ea501755b9a02.tar.gz |
We don't need to code multiple event loops or have branches in watch() if we can easily make the IO::KQueue-based interface look like our lower-level epoll_* API.
Diffstat (limited to 'lib/PublicInbox/Syscall.pm')
-rw-r--r-- | lib/PublicInbox/Syscall.pm | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/PublicInbox/Syscall.pm b/lib/PublicInbox/Syscall.pm index f1988e61..500efa67 100644 --- a/lib/PublicInbox/Syscall.pm +++ b/lib/PublicInbox/Syscall.pm @@ -248,13 +248,8 @@ sub sendfile_freebsd { sub epoll_defined { return $SYS_epoll_create ? 1 : 0; } -# ARGS: (size) -- but in modern Linux 2.6, the -# size doesn't even matter (radix tree now, not hash) sub epoll_create { - return -1 unless defined $SYS_epoll_create; - my $epfd = eval { syscall($SYS_epoll_create, $no_deprecated ? 0 : ($_[0]||100)+0) }; - return -1 if $@; - return $epfd; + syscall($SYS_epoll_create, $no_deprecated ? 0 : ($_[0]||100)+0); } # epoll_ctl wrapper |