mirror of
https://github.com/rcore-os/rCore-Tutorial-v3.git
synced 2024-11-24 10:26:25 +04:00
3 lines
15 KiB
HTML
3 lines
15 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="API documentation for the Rust `os` crate."><meta name="keywords" content="rust, rustlang, rust-lang, os"><title>os - 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="../crates.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 crate"><!--[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="#">Crate os</a></h2><div class="sidebar-elems"><div class="block"><ul><li class="version">Version 0.1.0</li><li><a id="all-types" href="all.html">All Items</a></li></ul></div><section><div class="block"><ul><li><a href="#modules">Modules</a></li><li><a href="#macros">Macros</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#statics">Statics</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">Crate <a class="mod" href="#">os</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/main.rs.html#1-277">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><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="board/index.html" title="os::board mod">board</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="config/index.html" title="os::config mod">config</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="console/index.html" title="os::console mod">console</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="drivers/index.html" title="os::drivers mod">drivers</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="fs/index.html" title="os::fs mod">fs</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="gui/index.html" title="os::gui mod">gui</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="lang_items/index.html" title="os::lang_items mod">lang_items</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="mm/index.html" title="os::mm mod">mm</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="sbi/index.html" title="os::sbi mod">sbi</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="sync/index.html" title="os::sync mod">sync</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="syscall/index.html" title="os::syscall mod">syscall</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="task/index.html" title="os::task mod">task</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="timer/index.html" title="os::timer mod">timer</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="trap/index.html" title="os::trap mod">trap</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"></div></div></div><h2 id="macros" class="small-section-header"><a href="#macros">Macros</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="macro" href="macro.print.html" title="os::print macro">print</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="macro" href="macro.println.html" title="os::println macro">println</a></div><div class="item-right docblock-short"></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.DEV_NON_BLOCKING_ACCESS.html" title="os::DEV_NON_BLOCKING_ACCESS struct">DEV_NON_BLOCKING_ACCESS</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Stack.html" title="os::Stack struct">Stack</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"></div></div></div><h2 id="enums" class="small-section-header"><a href="#enums">Enums</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.MIE.html" title="os::MIE enum">MIE</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.SIE.html" title="os::SIE enum">SIE</a></div><div class="item-right docblock-short"></div></div></div><h2 id="statics" class="small-section-header"><a href="#statics">Statics</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="static" href="static.STACK0.html" title="os::STACK0 static">STACK0</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="static" href="static.TIMER_SCRATCH.html" title="os::TIMER_SCRATCH static">TIMER_SCRATCH</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"></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.add_mtimecmp.html" title="os::add_mtimecmp fn">add_mtimecmp</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.clear_bss.html" title="os::clear_bss fn">clear_bss</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.count_mtiecmp.html" title="os::count_mtiecmp fn">count_mtiecmp</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.intr_on.html" title="os::intr_on fn">intr_on</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>enable all software interrupts
|
||
still need to set SIE bit in sstatus</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.medeleg_write.html" title="os::medeleg_write fn">medeleg_write</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.mideleg_write.html" title="os::mideleg_write fn">mideleg_write</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.mie_read.html" title="os::mie_read fn">mie_read</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.mie_write.html" title="os::mie_write fn">mie_write</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.mstatus_enable_interrupt.html" title="os::mstatus_enable_interrupt fn">mstatus_enable_interrupt</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.mstatus_read.html" title="os::mstatus_read fn">mstatus_read</a><span title="Restricted Visibility"> 🔒</span> <a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.mstatus_write.html" title="os::mstatus_write fn">mstatus_write</a><span title="Restricted Visibility"> 🔒</span> <a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.mtvec_write.html" title="os::mtvec_write fn">mtvec_write</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.read_mtime.html" title="os::read_mtime fn">read_mtime</a><span title="Restricted Visibility"> 🔒</span> <a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.rust_main.html" title="os::rust_main fn">rust_main</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.rust_start.html" title="os::rust_start fn">rust_start</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.sie_read.html" title="os::sie_read fn">sie_read</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.sie_write.html" title="os::sie_write fn">sie_write</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.timer_init.html" title="os::timer_init fn">timer_init</a><span title="Restricted Visibility"> 🔒</span> <a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.write_mtimecmp.html" title="os::write_mtimecmp fn">write_mtimecmp</a><span title="Restricted Visibility"> 🔒</span> <a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></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> |