-
Notifications
You must be signed in to change notification settings - Fork 365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] 标题示例: 为什么这里需要添加& #151
Comments
转成指针,这个是根据__switch要求转的 |
__switch 的功能是将当前上下文保存到current_task_cx_ptr, 并换上 next_task_cx_ptr指向的上下文。 |
我看了一下特性好像大部分指针都是 Rust 管理的指针,但是 |
准确术语来说,Rust 一般管理的是借用 (borrow),或者说引用,也就是 至于 借用论本质而言到底还是一个指针,但是 Rust 对它有严格的约束。而对裸指针的约束就十分宽松了。 这里 |
let next_task_cx_ptr = &task0.task_cx as *const TaskContext;
这句代码有什么说法么 ?当前上下文修改为const
但是好像并没有什么作用吧?The text was updated successfully, but these errors were encountered: