MCPcopy Create free account
hub / github.com/IBM/ACE-RISCV / try_write

Method try_write

security-monitor/src/core/page_allocator/allocator.rs:316–320  ·  view source on GitHub ↗
(op: O)

Source from the content-addressed store, hash-verified

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 }

Callers

nothing calls this directly

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected