pub unsafe fn release(&self, token: RestoreState) {
        unsafe {
            self.inner.release(token);
        }
    }
Releases the lock.

# Safety

- This function must only be called if the lock was acquired by the
current thread.
- The caller must ensure to release the locks in the reverse order they
were acquired.
- Each release call must be paired with an acquire call.
esp-hal/src/sync.rs