(op: O)
| 314 | #[rr::params("p")] |
| 315 | #[rr::requires(#iris "once_initialized π \"PAGE_ALLOCATOR\" (Some ())")] |
| 316 | #[rr::requires(#iris "□ ∀ x, {O::Pre} π p op x")] |
| 317 | #[rr::exists("x")] |
| 318 | #[rr::ensures(#iris "{O::Post} π p op x ret")] |
| 319 | fn try_write<F, O>(op: O) -> Result<F, Error> |
| 320 | where O: FnOnce(&mut RwLockWriteGuard<'static, PageAllocator>) -> Result<F, Error> { |
| 321 | //op(&mut PAGE_ALLOCATOR.get().expect(Self::NOT_INITIALIZED).write()) |
| 322 | op(&mut PAGE_ALLOCATOR.get().unwrap().write()) |
| 323 | } |