]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: wdt: use is_sched_alive() instead of keeping a local ctxsw copy
authorWilly Tarreau <w@1wt.eu>
Thu, 17 Apr 2025 13:26:30 +0000 (15:26 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 17 Apr 2025 14:25:47 +0000 (16:25 +0200)
commit590116478991f3c4eb217e8eb87f1124fe12a563
tree88c5fc3c88a9fadfe1f067a100874c957b5d6090
parent36ec70c526797267f337822468810225265fb44a
MINOR: wdt: use is_sched_alive() instead of keeping a local ctxsw copy

Now we can simply call is_sched_alive() on the local thread to verify
that the scheduler is still ticking instead of having to keep a copy of
the ctxsw and comparing it. It's cleaner, doesn't require to maintain
a local copy, doesn't rely on activity[] (whose purpose is mainly for
observation and debugging), and shows how this could be extended later
to cover other use cases. Practically speaking this doesn't change
anything however, the algorithm is still the same.
src/wdt.c