“Never claim more than one of M1 and M2 simultaneously”:To do this, we need to make...
“Never claim more than one of M1 and M2 simultaneously”:To do this, we need to make sure that exactly one such “mutex permission token” exists per thread. In the same file, we say:thread_local! { pub static MUTEX_PERMISSION_TOKEN: Cell<Option<MutexPermissionToken>> = Cell::new(Some(MutexPermissionToken(PhantomData))...