mirror of
https://github.com/rcore-os/rCore-Tutorial-v3.git
synced 2024-11-24 10:26:25 +04:00
deploy: afcb0d9269
This commit is contained in:
parent
123b3947cc
commit
faa7939a5b
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -206,7 +206,7 @@
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">block_current_task</span>() -> <span class="kw-2">*mut</span> <span class="ident">TaskContext</span> {
|
||||
<span class="kw">let</span> <span class="ident">task</span> <span class="op">=</span> <span class="ident">take_current_task</span>().<span class="ident">unwrap</span>();
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">task_inner</span> <span class="op">=</span> <span class="ident">task</span>.<span class="ident">inner_exclusive_access</span>();
|
||||
<span class="ident">task_inner</span>.<span class="ident">task_status</span> <span class="op">=</span> <span class="ident">TaskStatus::Blocking</span>;
|
||||
<span class="ident">task_inner</span>.<span class="ident">task_status</span> <span class="op">=</span> <span class="ident">TaskStatus::Blocked</span>;
|
||||
<span class="kw-2">&mut</span> <span class="ident">task_inner</span>.<span class="ident">task_cx</span> <span class="kw">as</span> <span class="kw-2">*mut</span> <span class="ident">TaskContext</span>
|
||||
}
|
||||
|
||||
|
@ -156,7 +156,7 @@
|
||||
<span class="kw">pub</span> <span class="kw">enum</span> <span class="ident">TaskStatus</span> {
|
||||
<span class="ident">Ready</span>,
|
||||
<span class="ident">Running</span>,
|
||||
<span class="ident">Blocking</span>,
|
||||
<span class="ident">Blocked</span>,
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="os" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0-nightly (f6f9d5e73 2022-08-04)" ></div></body></html>
|
Loading…
Reference in New Issue
Block a user