sh: Make the atomic functions safe for irqsoff tracing