mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-29 16:13:27 +00:00
Rename as_ptr_mut
to as_mut_ptr
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
b6944e48bd
commit
f1aae23234
@ -109,7 +109,7 @@ impl<T: 'static> CpuLocalCell<T> {
|
|||||||
/// data should be done with interrupts disabled. Otherwise, more care
|
/// data should be done with interrupts disabled. Otherwise, more care
|
||||||
/// must be taken to ensure that the borrowing rules are correctly
|
/// must be taken to ensure that the borrowing rules are correctly
|
||||||
/// enforced, since the interrupts may come asynchronously.
|
/// 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();
|
super::has_init::assert_true();
|
||||||
|
|
||||||
let offset = {
|
let offset = {
|
||||||
|
@ -46,7 +46,7 @@ pub(super) fn switch_to_task(next_task: Arc<Task>) {
|
|||||||
current_task.ctx.get()
|
current_task.ctx.get()
|
||||||
} else {
|
} else {
|
||||||
// Throughout this method, interrupts are disabled and the context can be exclusively used.
|
// 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();
|
let next_task_ctx_ptr = next_task.ctx().get().cast_const();
|
||||||
|
Reference in New Issue
Block a user