This commit is contained in:
wyfcyx 2023-01-19 06:00:47 +00:00
parent 123b3947cc
commit faa7939a5b
4 changed files with 6 additions and 6 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -206,7 +206,7 @@
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">block_current_task</span>() -&gt; <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">&amp;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>
}

View File

@ -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>