From f1aae232341bda78aa7bf1906e3d00df160962a8 Mon Sep 17 00:00:00 2001 From: Ruihan Li Date: Wed, 20 Nov 2024 20:40:56 +0800 Subject: [PATCH] Rename `as_ptr_mut` to `as_mut_ptr` --- ostd/src/cpu/local/cell.rs | 2 +- ostd/src/task/processor.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ostd/src/cpu/local/cell.rs b/ostd/src/cpu/local/cell.rs index 466e24c25..97f9131c4 100644 --- a/ostd/src/cpu/local/cell.rs +++ b/ostd/src/cpu/local/cell.rs @@ -109,7 +109,7 @@ impl CpuLocalCell { /// data should be done with interrupts disabled. Otherwise, more care /// must be taken to ensure that the borrowing rules are correctly /// enforced, since the interrupts may come asynchronously. - pub fn as_ptr_mut(&'static self) -> *mut T { + pub fn as_mut_ptr(&'static self) -> *mut T { super::has_init::assert_true(); let offset = { diff --git a/ostd/src/task/processor.rs b/ostd/src/task/processor.rs index b1650ff8b..114873efc 100644 --- a/ostd/src/task/processor.rs +++ b/ostd/src/task/processor.rs @@ -46,7 +46,7 @@ pub(super) fn switch_to_task(next_task: Arc) { current_task.ctx.get() } else { // Throughout this method, interrupts are disabled and the context can be exclusively used. - BOOTSTRAP_CONTEXT.as_ptr_mut() + BOOTSTRAP_CONTEXT.as_mut_ptr() }; let next_task_ctx_ptr = next_task.ctx().get().cast_const();