Lines Matching refs:ctx
170 THREAD_CTX.with(|ctx| { in set_flash()
171 ctx.borrow_mut().flash_params.insert(dev_id, FlashParamsStruct { in set_flash()
177 ctx.borrow_mut().flash_map.insert( in set_flash()
184 THREAD_CTX.with(|ctx| { in clear_flash()
185 ctx.borrow_mut().flash_map.remove(&dev_id); in clear_flash()
193 THREAD_CTX.with(|ctx| { in sim_get_flash_areas()
194 ctx.borrow().flash_areas.ptr in sim_get_flash_areas()
200 THREAD_CTX.with(|ctx| { in sim_set_flash_areas()
201 ctx.borrow_mut().flash_areas.ptr = areas; in sim_set_flash_areas()
207 THREAD_CTX.with(|ctx| { in sim_reset_flash_areas()
208 ctx.borrow_mut().flash_areas.ptr = ptr::null(); in sim_reset_flash_areas()
214 SIM_CTX.with(|ctx| { in sim_get_context()
215 ctx.borrow().ptr in sim_get_context()
221 SIM_CTX.with(|ctx| { in sim_set_context()
222 ctx.borrow_mut().ptr = ptr; in sim_set_context()
228 SIM_CTX.with(|ctx| { in sim_reset_context()
229 ctx.borrow_mut().ptr = ptr::null(); in sim_reset_context()
235 RAM_CTX.with(|ctx| { in bootsim_get_ram_info()
236 if ctx.borrow().base == 0 { in bootsim_get_ram_info()
241 ctx.as_ptr() in bootsim_get_ram_info()
247 RAM_CTX.with(|ctx| { in set_ram_info()
248 ctx.replace(info); in set_ram_info()
254 RAM_CTX.with(|ctx| { in clear_ram_info()
255 ctx.borrow_mut().base = 0; in clear_ram_info()
262 THREAD_CTX.with(|ctx| { in sim_flash_erase()
263 if let Some(flash) = ctx.borrow().flash_map.get(&dev_id) { in sim_flash_erase()
274 THREAD_CTX.with(|ctx| { in sim_flash_read()
275 if let Some(flash) = ctx.borrow().flash_map.get(&dev_id) { in sim_flash_read()
287 THREAD_CTX.with(|ctx| { in sim_flash_write()
288 if let Some(flash) = ctx.borrow().flash_map.get(&dev_id) { in sim_flash_write()
299 THREAD_CTX.with(|ctx| { in sim_flash_align()
300 ctx.borrow().flash_params.get(&id).unwrap().align in sim_flash_align()
306 THREAD_CTX.with(|ctx| { in sim_flash_erased_val()
307 ctx.borrow().flash_params.get(&id).unwrap().erased_val in sim_flash_erased_val()
347 NV_COUNTER_CTX.with(|ctx| { in sim_set_nv_counter_for_image()
348 let mut counter_storage = ctx.borrow_mut(); in sim_set_nv_counter_for_image()
368 NV_COUNTER_CTX.with(|ctx| { in sim_get_nv_counter_for_image()
369 let counter_storage = ctx.borrow(); in sim_get_nv_counter_for_image()