We can just check defined() on the `our' var itself and
save the process several kilobytes of memory.
# 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;
# epoll functions
############################################################################
-sub epoll_defined { $SYS_epoll_create ? 1 : 0; }
-
sub epoll_create {
syscall($SYS_epoll_create, $no_deprecated ? 0 : 100);
}