mirror of
https://github.com/rcore-os/rCore-Tutorial-v3.git
synced 2024-11-25 19:03:35 +04:00
21 lines
8.6 KiB
HTML
21 lines
8.6 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Task management implementation"><meta name="keywords" content="rust, rustlang, rust-lang, task"><title>os::task - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../../dark.css" disabled><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../../os/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../os/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">Module task</a></h2><div class="sidebar-elems"><section><div class="block"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div></section></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../os/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">os</a>::<wbr><a class="mod" href="#">task</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../src/os/task/mod.rs.html#1-173">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Task management implementation</p>
|
||
<p>Everything about task management, like starting and switching tasks is
|
||
implemented here.</p>
|
||
<p>A single global instance of <a href="struct.TaskManager.html" title="TaskManager"><code>TaskManager</code></a> called <code>TASK_MANAGER</code> controls
|
||
all the tasks in the operating system.</p>
|
||
<p>Be careful when you see <code>__switch</code> ASM function in <code>switch.S</code>. Control flow around this function
|
||
might not be what you expect.</p>
|
||
</div></details><h2 id="modules" class="small-section-header"><a href="#modules">Modules</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="mod" href="context/index.html" title="os::task::context mod">context</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"><p>Implementation of <a href="context/struct.TaskContext.html" title="TaskContext"><code>TaskContext</code></a></p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="switch/index.html" title="os::task::switch mod">switch</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"><p>Rust wrapper around <code>__switch</code>.</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="task/index.html" title="os::task::task mod">task</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"><p>Types related to task management</p>
|
||
</div></div></div><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.TASK_MANAGER.html" title="os::task::TASK_MANAGER struct">TASK_MANAGER</a></div><div class="item-right docblock-short"><p>Global variable: TASK_MANAGER</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.TaskContext.html" title="os::task::TaskContext struct">TaskContext</a></div><div class="item-right docblock-short"><p>Task Context</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.TaskManager.html" title="os::task::TaskManager struct">TaskManager</a></div><div class="item-right docblock-short"><p>The task manager, where all the tasks are managed.</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.TaskManagerInner.html" title="os::task::TaskManagerInner struct">TaskManagerInner</a></div><div class="item-right docblock-short"><p>Inner of Task Manager</p>
|
||
</div></div></div><h2 id="functions" class="small-section-header"><a href="#functions">Functions</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.exit_current_and_run_next.html" title="os::task::exit_current_and_run_next fn">exit_current_and_run_next</a></div><div class="item-right docblock-short"><p>exit current task, then run next task</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.mark_current_exited.html" title="os::task::mark_current_exited fn">mark_current_exited</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"><p>exit current task</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.mark_current_suspended.html" title="os::task::mark_current_suspended fn">mark_current_suspended</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"><p>suspend current task</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.run_first_task.html" title="os::task::run_first_task fn">run_first_task</a></div><div class="item-right docblock-short"><p>run first task</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.run_next_task.html" title="os::task::run_next_task fn">run_next_task</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"><p>rust next task</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.suspend_current_and_run_next.html" title="os::task::suspend_current_and_run_next fn">suspend_current_and_run_next</a></div><div class="item-right docblock-short"><p>suspend current task, then run next task</p>
|
||
</div></div></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> |