From d8f49eed19346690c33f5d9da5fbaf041f065f0f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 23 Dec 2022 12:51:07 +0000 Subject: syscall: get rid of epoll_defined() sub We can just check defined() on the `our' var itself and save the process several kilobytes of memory. --- lib/PublicInbox/DS.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/DS.pm') diff --git a/lib/PublicInbox/DS.pm b/lib/PublicInbox/DS.pm index 26840662..a6c43b22 100644 --- a/lib/PublicInbox/DS.pm +++ b/lib/PublicInbox/DS.pm @@ -126,7 +126,7 @@ sub add_uniq_timer { # ($name, $secs, $coderef, @args) = @_; # caller sets return value to $Epoll sub _InitPoller () { - if (PublicInbox::Syscall::epoll_defined()) { + if (defined $PublicInbox::Syscall::SYS_epoll_create) { my $fd = epoll_create(); die "epoll_create: $!" if $fd < 0; open($ep_io, '+<&=', $fd) or return; -- cgit v1.2.3-24-ge0c7