Rainer Gerhards ab11e9c0f7 runtime: modernize atomic helper usage
Why: several hot paths used legacy atomic idioms where read-only and weak state observations paid unnecessary synchronization cost or used mutex fallbacks in signal-sensitive paths.

Impact: common counters and weak flags use cheaper atomic operations on modern compilers while preserving fallback behavior for older platforms.

Before/After: before, helpers leaned on __sync fetch operations and some signal flags used mutex-backed access; after, helpers use __atomic operations with explicit relaxed/acquire/release intent and signal-safe weak flag access.

Technical Overview:

Replace legacy __sync-based helper implementations with __atomic forms.

Remove the now-unused separate load/store autoconf probe.

Add relaxed helper variants for statistics and weak object state paths.

Use PREFER_* helpers for signal-observed flags that tolerate weak fallback reads.

Keep bHadHUP set until doHUP() completes for imdiag AwaitHUPComplete.

Preserve 64-bit/time_t fallback mutexes for platforms without 64-bit atomics.

Adjust sanitizer suppressions for known helper-access false positives.

Join tcpsrv and imbeats workers before tearing down shared listener state.

Add a small mmutf8fix regression coverage improvement touched by this work.

With the help of AI-Agents: Codex
2026-07-02 12:46:12 +02:00
..