Patch 3/4 of the effort to make TLS access async-signal-safe.