pub fn with<R>(&self, f: impl FnOnce(&mut T) -> R) -> R {
        lock(&self.lock_state, || f(unsafe { &mut *self.data.get() }))
    }
Provide exclusive access to the protected data to the given closure.

Calling this reentrantly will panic.
esp-hal/src/sync.rs