about summary refs log tree commit homepage
path: root/lib/PublicInbox/InboxIdle.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-12-28 04:23:00 +0000
committerEric Wong <e@80x24.org>2023-12-29 16:56:08 +0000
commitcf977e706b07e80f394570a393eb2169b9b9a1a7 (patch)
treecaa1a8a4cad1ec89e59658fc088a3b5054dbf58a /lib/PublicInbox/InboxIdle.pm
parent84874a852c80e3d4eb96af14c017b37424cdf840 (diff)
downloadpublic-inbox-cf977e706b07e80f394570a393eb2169b9b9a1a7.tar.gz
This is a step towards improving the out-of-the-box experience
in achieving notifications without XS, extra downloads, and .so
loading + runtime mmap overhead.

This also fixes loongarch support of all Linux syscalls due to
a bad regexp :x

All the reachable Linux architectures listed at
<https://portal.cfarm.net/machines/list/> should be supported.
At the moment, there appears to be no reachable sparc* Linux
machines available to cfarm users.

Fixes: b0e5093aa3572a86 (syscall: add support for riscv64, 2022-08-11)
Diffstat (limited to 'lib/PublicInbox/InboxIdle.pm')
-rw-r--r--lib/PublicInbox/InboxIdle.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/InboxIdle.pm b/lib/PublicInbox/InboxIdle.pm
index 4231c0a0..3c4d4a68 100644
--- a/lib/PublicInbox/InboxIdle.pm
+++ b/lib/PublicInbox/InboxIdle.pm
@@ -11,7 +11,7 @@ use PublicInbox::Syscall qw(EPOLLIN);
 my $IN_MODIFY = 0x02; # match Linux inotify
 my $ino_cls;
 if ($^O eq 'linux' && eval { require PublicInbox::Inotify }) {
-        $IN_MODIFY = Linux::Inotify2::IN_MODIFY();
+        $IN_MODIFY = PublicInbox::Inotify::IN_MODIFY();
         $ino_cls = 'PublicInbox::Inotify';
 } elsif (eval { require PublicInbox::KQNotify }) {
         $IN_MODIFY = PublicInbox::KQNotify::NOTE_WRITE();
@@ -34,7 +34,7 @@ sub in2_arm ($$) { # PublicInbox::Config::each_inbox callback
                 $ibx->{unlock_subs} = $old_ibx->{unlock_subs};
                 %{$ibx->{unlock_subs}} = (%$u, %{$ibx->{unlock_subs}}) if $u;
 
-                # Linux::Inotify2::Watch::name matches if watches are the
+                # *::Inotify*::Watch::name matches if watches are the
                 # same, no point in replacing a watch of the same name
                 if ($cur->[1]->name eq $lock) {
                         $self->{on_unlock}->{$lock} = $ibx;
@@ -87,7 +87,7 @@ sub new {
 sub event_step {
         my ($self) = @_;
         eval {
-                my @events = $self->{inot}->read; # Linux::Inotify2::read
+                my @events = $self->{inot}->read; # PublicInbox::Inotify3::read
                 my $on_unlock = $self->{on_unlock};
                 for my $ev (@events) {
                         my $fn = $ev->fullname // next; # cancelled