mirror of
https://github.com/rcore-os/rCore-Tutorial-v3.git
synced 2024-11-24 10:26:25 +04:00
deploy: af05b65e7f
This commit is contained in:
parent
d522f129dd
commit
1f36062ffa
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
<!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 `VIRTIO5` constant in crate `os`."><meta name="keywords" content="rust, rustlang, rust-lang, VIRTIO5"><title>VIRTIO5 in os::drivers::input - 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="sidebar-items.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 constant"><!--[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><div class="sidebar-elems"><h2 class="location"><a href="index.html">In os::drivers::input</a></h2></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">Constant <a href="../../index.html">os</a>::<wbr><a href="../index.html">drivers</a>::<wbr><a href="index.html">input</a>::<wbr><a class="constant" href="#">VIRTIO5</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/drivers/input/mod.rs.html#8">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust const"><code>const VIRTIO5: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a> = 0x10005000;</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>
|
||||
<!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 `VIRTIO5` constant in crate `os`."><meta name="keywords" content="rust, rustlang, rust-lang, VIRTIO5"><title>VIRTIO5 in os::drivers::input - 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="sidebar-items.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 constant"><!--[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><div class="sidebar-elems"><h2 class="location"><a href="index.html">In os::drivers::input</a></h2></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">Constant <a href="../../index.html">os</a>::<wbr><a href="../index.html">drivers</a>::<wbr><a href="index.html">input</a>::<wbr><a class="constant" href="#">VIRTIO5</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/drivers/input/mod.rs.html#11">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust const"><code>const VIRTIO5: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a> = 0x10005000;</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>
|
@ -1 +1 @@
|
||||
<!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 `VIRTIO6` constant in crate `os`."><meta name="keywords" content="rust, rustlang, rust-lang, VIRTIO6"><title>VIRTIO6 in os::drivers::input - 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="sidebar-items.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 constant"><!--[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><div class="sidebar-elems"><h2 class="location"><a href="index.html">In os::drivers::input</a></h2></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">Constant <a href="../../index.html">os</a>::<wbr><a href="../index.html">drivers</a>::<wbr><a href="index.html">input</a>::<wbr><a class="constant" href="#">VIRTIO6</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/drivers/input/mod.rs.html#9">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust const"><code>const VIRTIO6: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a> = 0x10006000;</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>
|
||||
<!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 `VIRTIO6` constant in crate `os`."><meta name="keywords" content="rust, rustlang, rust-lang, VIRTIO6"><title>VIRTIO6 in os::drivers::input - 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="sidebar-items.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 constant"><!--[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><div class="sidebar-elems"><h2 class="location"><a href="index.html">In os::drivers::input</a></h2></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">Constant <a href="../../index.html">os</a>::<wbr><a href="../index.html">drivers</a>::<wbr><a href="index.html">input</a>::<wbr><a class="constant" href="#">VIRTIO6</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/drivers/input/mod.rs.html#12">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust const"><code>const VIRTIO6: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a> = 0x10006000;</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>
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
window.SIDEBAR_ITEMS = {"constant":[["VIRTIO5",""],["VIRTIO6",""]],"struct":[["KEYBOARD_DEVICE",""],["MOUSE_DEVICE",""],["VirtIOInputWrapper",""]],"trait":[["InputDevice",""]]};
|
||||
window.SIDEBAR_ITEMS = {"constant":[["VIRTIO5",""],["VIRTIO6",""]],"struct":[["KEYBOARD_DEVICE",""],["MOUSE_DEVICE",""],["VirtIOInputInner",""],["VirtIOInputWrapper",""]],"trait":[["InputDevice",""]]};
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
27
ch9-gui-dev/os/drivers/input/struct.VirtIOInputInner.html
Normal file
27
ch9-gui-dev/os/drivers/input/struct.VirtIOInputInner.html
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,3 +1,5 @@
|
||||
<!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 `InputDevice` trait in crate `os`."><meta name="keywords" content="rust, rustlang, rust-lang, InputDevice"><title>InputDevice in os::drivers::input - 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="sidebar-items.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 trait"><!--[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="#">InputDevice</a></h2><div class="sidebar-elems"><section><div class="block"><h3 class="sidebar-title"><a href="#required-methods">Required Methods</a></h3><ul><li><a href="#tymethod.handle_irq">handle_irq</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#implementors">Implementors</a></h3></div></section><h2 class="location"><a href="index.html">In os::drivers::input</a></h2></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">Trait <a href="../../index.html">os</a>::<wbr><a href="../index.html">drivers</a>::<wbr><a href="index.html">input</a>::<wbr><a class="trait" href="#">InputDevice</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/drivers/input/mod.rs.html#13-15">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust trait"><code>pub trait InputDevice: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> {
|
||||
fn <a href="#tymethod.handle_irq" class="fnname">handle_irq</a>(&self);
|
||||
}</code></pre></div><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><div id="tymethod.handle_irq" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/os/drivers/input/mod.rs.html#14">source</a></div><h4 class="code-header">fn <a href="#tymethod.handle_irq" class="fnname">handle_irq</a>(&self)</h4></div></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><section id="impl-InputDevice-for-VirtIOInputWrapper" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../../src/os/drivers/input/mod.rs.html#32-57">source</a></span><a href="#impl-InputDevice-for-VirtIOInputWrapper" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.InputDevice.html" title="trait os::drivers::input::InputDevice">InputDevice</a> for <a class="struct" href="struct.VirtIOInputWrapper.html" title="struct os::drivers::input::VirtIOInputWrapper">VirtIOInputWrapper</a></h3></section></div><script type="text/javascript" src="../../../implementors/os/drivers/input/trait.InputDevice.js" data-ignore-extern-crates="" async></script></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>
|
||||
<!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 `InputDevice` trait in crate `os`."><meta name="keywords" content="rust, rustlang, rust-lang, InputDevice"><title>InputDevice in os::drivers::input - 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="sidebar-items.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 trait"><!--[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="#">InputDevice</a></h2><div class="sidebar-elems"><section><div class="block"><h3 class="sidebar-title"><a href="#required-methods">Required Methods</a></h3><ul><li><a href="#tymethod.handle_irq">handle_irq</a></li><li><a href="#tymethod.is_empty">is_empty</a></li><li><a href="#tymethod.read_event">read_event</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#implementors">Implementors</a></h3></div></section><h2 class="location"><a href="index.html">In os::drivers::input</a></h2></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">Trait <a href="../../index.html">os</a>::<wbr><a href="../index.html">drivers</a>::<wbr><a href="index.html">input</a>::<wbr><a class="trait" href="#">InputDevice</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/drivers/input/mod.rs.html#26-31">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust trait"><code>pub trait InputDevice: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> {
|
||||
fn <a href="#tymethod.read_event" class="fnname">read_event</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u64.html">u64</a>;
|
||||
<span class="item-spacer"></span> fn <a href="#tymethod.handle_irq" class="fnname">handle_irq</a>(&self);
|
||||
<span class="item-spacer"></span> fn <a href="#tymethod.is_empty" class="fnname">is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.bool.html">bool</a>;
|
||||
}</code></pre></div><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><div id="tymethod.read_event" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/os/drivers/input/mod.rs.html#27">source</a></div><h4 class="code-header">fn <a href="#tymethod.read_event" class="fnname">read_event</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u64.html">u64</a></h4></div><div id="tymethod.handle_irq" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/os/drivers/input/mod.rs.html#28">source</a></div><h4 class="code-header">fn <a href="#tymethod.handle_irq" class="fnname">handle_irq</a>(&self)</h4></div><div id="tymethod.is_empty" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/os/drivers/input/mod.rs.html#30">source</a></div><h4 class="code-header">fn <a href="#tymethod.is_empty" class="fnname">is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.bool.html">bool</a></h4></div></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><section id="impl-InputDevice-for-VirtIOInputWrapper" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../../src/os/drivers/input/mod.rs.html#80-123">source</a></span><a href="#impl-InputDevice-for-VirtIOInputWrapper" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.InputDevice.html" title="trait os::drivers::input::InputDevice">InputDevice</a> for <a class="struct" href="struct.VirtIOInputWrapper.html" title="struct os::drivers::input::VirtIOInputWrapper">VirtIOInputWrapper</a></h3></section></div><script type="text/javascript" src="../../../implementors/os/drivers/input/trait.InputDevice.js" data-ignore-extern-crates="" async></script></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>
|
@ -1,2 +1,2 @@
|
||||
<!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 `rust_main` fn in crate `os`."><meta name="keywords" content="rust, rustlang, rust-lang, rust_main"><title>rust_main in 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="sidebar-items.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 fn"><!--[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><div class="sidebar-elems"><h2 class="location"><a href="index.html">In os</a></h2></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">Function <a href="index.html">os</a>::<wbr><a class="fn" href="#">rust_main</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#56-77">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>#[no_mangle]
|
||||
<!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 `rust_main` fn in crate `os`."><meta name="keywords" content="rust, rustlang, rust-lang, rust_main"><title>rust_main in 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="sidebar-items.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 fn"><!--[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><div class="sidebar-elems"><h2 class="location"><a href="index.html">In os</a></h2></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">Function <a href="index.html">os</a>::<wbr><a class="fn" href="#">rust_main</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#56-78">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>#[no_mangle]
|
||||
pub fn rust_main() -> <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.never.html">!</a></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>
|
File diff suppressed because one or more lines are too long
1
ch9-gui-dev/os/syscall/constant.SYSCALL_EVENT_GET.html
Normal file
1
ch9-gui-dev/os/syscall/constant.SYSCALL_EVENT_GET.html
Normal file
@ -0,0 +1 @@
|
||||
<!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 `SYSCALL_EVENT_GET` constant in crate `os`."><meta name="keywords" content="rust, rustlang, rust-lang, SYSCALL_EVENT_GET"><title>SYSCALL_EVENT_GET in os::syscall - 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="sidebar-items.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 constant"><!--[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><div class="sidebar-elems"><h2 class="location"><a href="index.html">In os::syscall</a></h2></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">Constant <a href="../index.html">os</a>::<wbr><a href="index.html">syscall</a>::<wbr><a class="constant" href="#">SYSCALL_EVENT_GET</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/syscall/mod.rs.html#30">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust const"><code>const SYSCALL_EVENT_GET: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a> = 3000;</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>
|
@ -1 +1 @@
|
||||
<!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 `syscall` fn in crate `os`."><meta name="keywords" content="rust, rustlang, rust-lang, syscall"><title>syscall in os::syscall - 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="sidebar-items.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 fn"><!--[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><div class="sidebar-elems"><h2 class="location"><a href="index.html">In os::syscall</a></h2></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">Function <a href="../index.html">os</a>::<wbr><a href="index.html">syscall</a>::<wbr><a class="fn" href="#">syscall</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/syscall/mod.rs.html#43-76">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn syscall(syscall_id: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a>, args: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.array.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.array.html">; 3]</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.isize.html">isize</a></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>
|
||||
<!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 `syscall` fn in crate `os`."><meta name="keywords" content="rust, rustlang, rust-lang, syscall"><title>syscall in os::syscall - 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="sidebar-items.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 fn"><!--[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><div class="sidebar-elems"><h2 class="location"><a href="index.html">In os::syscall</a></h2></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">Function <a href="../index.html">os</a>::<wbr><a href="index.html">syscall</a>::<wbr><a class="fn" href="#">syscall</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/syscall/mod.rs.html#46-80">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn syscall(syscall_id: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a>, args: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.array.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.array.html">; 3]</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.isize.html">isize</a></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>
|
File diff suppressed because one or more lines are too long
1
ch9-gui-dev/os/syscall/input/fn.sys_event_get.html
Normal file
1
ch9-gui-dev/os/syscall/input/fn.sys_event_get.html
Normal file
@ -0,0 +1 @@
|
||||
<!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 `sys_event_get` fn in crate `os`."><meta name="keywords" content="rust, rustlang, rust-lang, sys_event_get"><title>sys_event_get in os::syscall::input - 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="sidebar-items.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 fn"><!--[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><div class="sidebar-elems"><h2 class="location"><a href="index.html">In os::syscall::input</a></h2></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">Function <a href="../../index.html">os</a>::<wbr><a href="../index.html">syscall</a>::<wbr><a href="index.html">input</a>::<wbr><a class="fn" href="#">sys_event_get</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/syscall/input.rs.html#4-17">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn sys_event_get() -> <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.isize.html">isize</a></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>
|
1
ch9-gui-dev/os/syscall/input/index.html
Normal file
1
ch9-gui-dev/os/syscall/input/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!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 `input` mod in crate `os`."><meta name="keywords" content="rust, rustlang, rust-lang, input"><title>os::syscall::input - 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 input</a></h2><div class="sidebar-elems"><section><div class="block"><ul><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 href="../index.html">syscall</a>::<wbr><a class="mod" href="#">input</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/syscall/input.rs.html#2-17">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></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.sys_event_get.html" title="os::syscall::input::sys_event_get fn">sys_event_get</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>
|
1
ch9-gui-dev/os/syscall/input/sidebar-items.js
Normal file
1
ch9-gui-dev/os/syscall/input/sidebar-items.js
Normal file
@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {"fn":[["sys_event_get",""]]};
|
@ -1 +1 @@
|
||||
window.SIDEBAR_ITEMS = {"constant":[["SYSCALL_CLOSE",""],["SYSCALL_CONDVAR_CREATE",""],["SYSCALL_CONDVAR_SIGNAL",""],["SYSCALL_CONDVAR_WAIT",""],["SYSCALL_DUP",""],["SYSCALL_EXEC",""],["SYSCALL_EXIT",""],["SYSCALL_FORK",""],["SYSCALL_FRAMEBUFFER",""],["SYSCALL_FRAMEBUFFER_FLUSH",""],["SYSCALL_GETPID",""],["SYSCALL_GETTID",""],["SYSCALL_GET_TIME",""],["SYSCALL_KILL",""],["SYSCALL_MUTEX_CREATE",""],["SYSCALL_MUTEX_LOCK",""],["SYSCALL_MUTEX_UNLOCK",""],["SYSCALL_OPEN",""],["SYSCALL_PIPE",""],["SYSCALL_READ",""],["SYSCALL_SEMAPHORE_CREATE",""],["SYSCALL_SEMAPHORE_DOWN",""],["SYSCALL_SEMAPHORE_UP",""],["SYSCALL_SLEEP",""],["SYSCALL_THREAD_CREATE",""],["SYSCALL_WAITPID",""],["SYSCALL_WAITTID",""],["SYSCALL_WRITE",""],["SYSCALL_YIELD",""]],"fn":[["syscall",""]],"mod":[["fs",""],["gui",""],["process",""],["sync",""],["thread",""]]};
|
||||
window.SIDEBAR_ITEMS = {"constant":[["SYSCALL_CLOSE",""],["SYSCALL_CONDVAR_CREATE",""],["SYSCALL_CONDVAR_SIGNAL",""],["SYSCALL_CONDVAR_WAIT",""],["SYSCALL_DUP",""],["SYSCALL_EVENT_GET",""],["SYSCALL_EXEC",""],["SYSCALL_EXIT",""],["SYSCALL_FORK",""],["SYSCALL_FRAMEBUFFER",""],["SYSCALL_FRAMEBUFFER_FLUSH",""],["SYSCALL_GETPID",""],["SYSCALL_GETTID",""],["SYSCALL_GET_TIME",""],["SYSCALL_KILL",""],["SYSCALL_MUTEX_CREATE",""],["SYSCALL_MUTEX_LOCK",""],["SYSCALL_MUTEX_UNLOCK",""],["SYSCALL_OPEN",""],["SYSCALL_PIPE",""],["SYSCALL_READ",""],["SYSCALL_SEMAPHORE_CREATE",""],["SYSCALL_SEMAPHORE_DOWN",""],["SYSCALL_SEMAPHORE_UP",""],["SYSCALL_SLEEP",""],["SYSCALL_THREAD_CREATE",""],["SYSCALL_WAITPID",""],["SYSCALL_WAITTID",""],["SYSCALL_WRITE",""],["SYSCALL_YIELD",""]],"fn":[["syscall",""]],"mod":[["fs",""],["gui",""],["input",""],["process",""],["sync",""],["thread",""]]};
|
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
||||
var sourcesIndex = JSON.parse('{\
|
||||
"os":["",[["boards",[],["qemu.rs"]],["drivers",[["block",[],["mod.rs","virtio_blk.rs"]],["bus",[],["mod.rs","virtio.rs"]],["chardev",[],["mod.rs","ns16550a.rs"]],["gpu",[],["mod.rs"]],["input",[],["mod.rs"]]],["mod.rs","plic.rs"]],["fs",[],["inode.rs","mod.rs","pipe.rs","stdio.rs"]],["mm",[],["address.rs","frame_allocator.rs","heap_allocator.rs","memory_set.rs","mod.rs","page_table.rs"]],["sync",[],["condvar.rs","mod.rs","mutex.rs","semaphore.rs","up.rs"]],["syscall",[],["fs.rs","gui.rs","mod.rs","process.rs","sync.rs","thread.rs"]],["task",[],["context.rs","id.rs","manager.rs","mod.rs","process.rs","processor.rs","signal.rs","switch.rs","task.rs"]],["trap",[],["context.rs","mod.rs"]]],["config.rs","console.rs","lang_items.rs","main.rs","sbi.rs","timer.rs"]]\
|
||||
"os":["",[["boards",[],["qemu.rs"]],["drivers",[["block",[],["mod.rs","virtio_blk.rs"]],["bus",[],["mod.rs","virtio.rs"]],["chardev",[],["mod.rs","ns16550a.rs"]],["gpu",[],["mod.rs"]],["input",[],["mod.rs"]]],["mod.rs","plic.rs"]],["fs",[],["inode.rs","mod.rs","pipe.rs","stdio.rs"]],["mm",[],["address.rs","frame_allocator.rs","heap_allocator.rs","memory_set.rs","mod.rs","page_table.rs"]],["sync",[],["condvar.rs","mod.rs","mutex.rs","semaphore.rs","up.rs"]],["syscall",[],["fs.rs","gui.rs","input.rs","mod.rs","process.rs","sync.rs","thread.rs"]],["task",[],["context.rs","id.rs","manager.rs","mod.rs","process.rs","processor.rs","signal.rs","switch.rs","task.rs"]],["trap",[],["context.rs","mod.rs"]]],["config.rs","console.rs","lang_items.rs","main.rs","sbi.rs","timer.rs"]]\
|
||||
}');
|
||||
createSourceSidebar();
|
||||
|
@ -55,8 +55,77 @@
|
||||
<span id="55">55</span>
|
||||
<span id="56">56</span>
|
||||
<span id="57">57</span>
|
||||
<span id="58">58</span>
|
||||
<span id="59">59</span>
|
||||
<span id="60">60</span>
|
||||
<span id="61">61</span>
|
||||
<span id="62">62</span>
|
||||
<span id="63">63</span>
|
||||
<span id="64">64</span>
|
||||
<span id="65">65</span>
|
||||
<span id="66">66</span>
|
||||
<span id="67">67</span>
|
||||
<span id="68">68</span>
|
||||
<span id="69">69</span>
|
||||
<span id="70">70</span>
|
||||
<span id="71">71</span>
|
||||
<span id="72">72</span>
|
||||
<span id="73">73</span>
|
||||
<span id="74">74</span>
|
||||
<span id="75">75</span>
|
||||
<span id="76">76</span>
|
||||
<span id="77">77</span>
|
||||
<span id="78">78</span>
|
||||
<span id="79">79</span>
|
||||
<span id="80">80</span>
|
||||
<span id="81">81</span>
|
||||
<span id="82">82</span>
|
||||
<span id="83">83</span>
|
||||
<span id="84">84</span>
|
||||
<span id="85">85</span>
|
||||
<span id="86">86</span>
|
||||
<span id="87">87</span>
|
||||
<span id="88">88</span>
|
||||
<span id="89">89</span>
|
||||
<span id="90">90</span>
|
||||
<span id="91">91</span>
|
||||
<span id="92">92</span>
|
||||
<span id="93">93</span>
|
||||
<span id="94">94</span>
|
||||
<span id="95">95</span>
|
||||
<span id="96">96</span>
|
||||
<span id="97">97</span>
|
||||
<span id="98">98</span>
|
||||
<span id="99">99</span>
|
||||
<span id="100">100</span>
|
||||
<span id="101">101</span>
|
||||
<span id="102">102</span>
|
||||
<span id="103">103</span>
|
||||
<span id="104">104</span>
|
||||
<span id="105">105</span>
|
||||
<span id="106">106</span>
|
||||
<span id="107">107</span>
|
||||
<span id="108">108</span>
|
||||
<span id="109">109</span>
|
||||
<span id="110">110</span>
|
||||
<span id="111">111</span>
|
||||
<span id="112">112</span>
|
||||
<span id="113">113</span>
|
||||
<span id="114">114</span>
|
||||
<span id="115">115</span>
|
||||
<span id="116">116</span>
|
||||
<span id="117">117</span>
|
||||
<span id="118">118</span>
|
||||
<span id="119">119</span>
|
||||
<span id="120">120</span>
|
||||
<span id="121">121</span>
|
||||
<span id="122">122</span>
|
||||
<span id="123">123</span>
|
||||
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident"><span class="kw">crate</span>::drivers::bus::virtio::VirtioHal</span>;
|
||||
<span class="kw">use</span> <span class="ident"><span class="kw">crate</span>::sync::UPIntrFreeCell</span>;
|
||||
<span class="kw">use</span> <span class="ident"><span class="kw">crate</span>::sync</span>::{<span class="ident">Condvar</span>, <span class="ident">UPIntrFreeCell</span>};
|
||||
<span class="kw">use</span> <span class="ident"><span class="kw">crate</span>::task::schedule</span>;
|
||||
<span class="kw">use</span> <span class="ident">alloc::collections::BTreeMap</span>;
|
||||
<span class="kw">use</span> <span class="ident">alloc::collections::VecDeque</span>;
|
||||
<span class="kw">use</span> <span class="ident">alloc::sync::Arc</span>;
|
||||
<span class="kw">use</span> <span class="ident">core::any::Any</span>;
|
||||
<span class="kw">use</span> <span class="ident">virtio_drivers</span>::{<span class="ident">VirtIOHeader</span>, <span class="ident">VirtIOInput</span>};
|
||||
@ -65,52 +134,115 @@
|
||||
<span class="kw">const</span> <span class="ident">VIRTIO5</span>: <span class="ident">usize</span> <span class="op">=</span> <span class="number">0x10005000</span>;
|
||||
<span class="kw">const</span> <span class="ident">VIRTIO6</span>: <span class="ident">usize</span> <span class="op">=</span> <span class="number">0x10006000</span>;
|
||||
|
||||
<span class="kw">struct</span> <span class="ident">VirtIOInputWrapper</span>(<span class="ident">UPIntrFreeCell</span><span class="op"><</span><span class="ident">VirtIOInput</span><span class="op"><</span><span class="lifetime">'static</span>, <span class="ident">VirtioHal</span><span class="op">></span><span class="op">></span>);
|
||||
<span class="kw">struct</span> <span class="ident">VirtIOInputInner</span> {
|
||||
<span class="ident">virtio_input</span>: <span class="ident">VirtIOInput</span><span class="op"><</span><span class="lifetime">'static</span>, <span class="ident">VirtioHal</span><span class="op">></span>,
|
||||
<span class="ident">events</span>: <span class="ident">VecDeque</span><span class="op"><</span><span class="ident">u64</span><span class="op">></span>,
|
||||
}
|
||||
|
||||
<span class="kw">struct</span> <span class="ident">VirtIOInputWrapper</span> {
|
||||
<span class="ident">inner</span>: <span class="ident">UPIntrFreeCell</span><span class="op"><</span><span class="ident">VirtIOInputInner</span><span class="op">></span>,
|
||||
<span class="comment">//condvars: BTreeMap<u16, Condvar>,</span>
|
||||
<span class="comment">//condvar: Arc::<Condvar> ,</span>
|
||||
<span class="ident">condvar</span>:<span class="ident">Condvar</span>,
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">trait</span> <span class="ident">InputDevice</span>: <span class="ident">Send</span> <span class="op">+</span> <span class="ident">Sync</span> <span class="op">+</span> <span class="ident">Any</span> {
|
||||
<span class="kw">fn</span> <span class="ident">read_event</span>(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="ident">u64</span>;
|
||||
<span class="kw">fn</span> <span class="ident">handle_irq</span>(<span class="kw-2">&</span><span class="self">self</span>);
|
||||
<span class="comment">// fn events(&self) -> &VecDeque<u64>;</span>
|
||||
<span class="kw">fn</span> <span class="ident">is_empty</span>(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="ident">bool</span>;
|
||||
}
|
||||
|
||||
<span class="macro">lazy_static::lazy_static!</span>(
|
||||
<span class="kw">pub</span> <span class="kw">static</span> <span class="kw-2">ref</span> <span class="ident">KEYBOARD_DEVICE</span>: <span class="ident">Arc</span><span class="op"><</span><span class="kw">dyn</span> <span class="ident">InputDevice</span><span class="op">></span> <span class="op">=</span> <span class="ident">Arc::new</span>(<span class="ident">VirtIOInputWrapper::new</span>(<span class="ident">VIRTIO5</span>));
|
||||
<span class="kw">pub</span> <span class="kw">static</span> <span class="kw-2">ref</span> <span class="ident">MOUSE_DEVICE</span>: <span class="ident">Arc</span><span class="op"><</span><span class="kw">dyn</span> <span class="ident">InputDevice</span><span class="op">></span> <span class="op">=</span> <span class="ident">Arc::new</span>(<span class="ident">VirtIOInputWrapper::new</span>(<span class="ident">VIRTIO6</span>));
|
||||
<span class="comment">// pub static ref INPUT_CONDVAR: Arc::<Condvar> = Arc::new(Condvar::new());</span>
|
||||
);
|
||||
|
||||
<span class="comment">// from virtio-drivers/src/input.rs</span>
|
||||
<span class="comment">//const QUEUE_SIZE: u16 = 32;</span>
|
||||
<span class="comment">// pub fn read_input_event() -> u64 {</span>
|
||||
<span class="comment">// loop {</span>
|
||||
|
||||
<span class="comment">// //let mut inner = self.inner.exclusive_access();</span>
|
||||
<span class="comment">// let kb=KEYBOARD_DEVICE.clone();</span>
|
||||
<span class="comment">// let evs = kb.events();</span>
|
||||
<span class="comment">// if let Some(event) = evs.pop_front() {</span>
|
||||
<span class="comment">// return event;</span>
|
||||
<span class="comment">// } else {</span>
|
||||
<span class="comment">// let task_cx_ptr = INPUT_CONDVAR.clone().wait_no_sched();</span>
|
||||
<span class="comment">// drop(inner);</span>
|
||||
<span class="comment">// schedule(task_cx_ptr);</span>
|
||||
<span class="comment">// }</span>
|
||||
<span class="comment">// }</span>
|
||||
<span class="comment">// }</span>
|
||||
<span class="kw">impl</span> <span class="ident">VirtIOInputWrapper</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">addr</span>: <span class="ident">usize</span>) -> <span class="self">Self</span> {
|
||||
<span class="self">Self</span>(<span class="kw">unsafe</span> {
|
||||
<span class="ident">UPIntrFreeCell::new</span>(
|
||||
<span class="ident">VirtIOInput</span>::<span class="op"><</span><span class="ident">VirtioHal</span><span class="op">></span><span class="ident">::new</span>(<span class="kw-2">&mut</span> <span class="kw-2">*</span>(<span class="ident">addr</span> <span class="kw">as</span> <span class="kw-2">*mut</span> <span class="ident">VirtIOHeader</span>)).<span class="ident">unwrap</span>(),
|
||||
)
|
||||
})
|
||||
<span class="kw">let</span> <span class="ident">inner</span> <span class="op">=</span> <span class="ident">VirtIOInputInner</span> {
|
||||
<span class="ident">virtio_input</span>: <span class="kw">unsafe</span> {
|
||||
<span class="ident">VirtIOInput</span>::<span class="op"><</span><span class="ident">VirtioHal</span><span class="op">></span><span class="ident">::new</span>(<span class="kw-2">&mut</span> <span class="kw-2">*</span>(<span class="ident">addr</span> <span class="kw">as</span> <span class="kw-2">*mut</span> <span class="ident">VirtIOHeader</span>)).<span class="ident">unwrap</span>()
|
||||
},
|
||||
<span class="ident">events</span>: <span class="ident">VecDeque::new</span>(),
|
||||
};
|
||||
|
||||
<span class="comment">// let mut condvars = BTreeMap::new();</span>
|
||||
<span class="comment">// let channels = QUEUE_SIZE;</span>
|
||||
<span class="comment">// for i in 0..channels {</span>
|
||||
<span class="comment">// let condvar = Condvar::new();</span>
|
||||
<span class="comment">// condvars.insert(i, condvar);</span>
|
||||
<span class="comment">// }</span>
|
||||
|
||||
<span class="self">Self</span> {
|
||||
<span class="ident">inner</span>: <span class="kw">unsafe</span> { <span class="ident">UPIntrFreeCell::new</span>(<span class="ident">inner</span>) },
|
||||
<span class="comment">//condvar: INPUT_CONDVAR.clone(),</span>
|
||||
<span class="ident">condvar</span>: <span class="ident">Condvar::new</span>(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">InputDevice</span> <span class="kw">for</span> <span class="ident">VirtIOInputWrapper</span> {
|
||||
<span class="kw">fn</span> <span class="ident">handle_irq</span>(<span class="kw-2">&</span><span class="self">self</span>) {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">input</span> <span class="op">=</span> <span class="self">self</span>.<span class="number">0</span>.<span class="ident">exclusive_access</span>();
|
||||
<span class="ident">input</span>.<span class="ident">ack_interrupt</span>();
|
||||
<span class="kw">while</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">event</span>) <span class="op">=</span> <span class="ident">input</span>.<span class="ident">pop_pending_event</span>() {
|
||||
<span class="kw">let</span> <span class="ident">dtype</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">Decoder::decode</span>(
|
||||
<span class="ident">event</span>.<span class="ident">event_type</span> <span class="kw">as</span> <span class="ident">usize</span>,
|
||||
<span class="ident">event</span>.<span class="ident">code</span> <span class="kw">as</span> <span class="ident">usize</span>,
|
||||
<span class="ident">event</span>.<span class="ident">value</span> <span class="kw">as</span> <span class="ident">usize</span>,
|
||||
) {
|
||||
<span class="prelude-val">Ok</span>(<span class="ident">dtype</span>) => <span class="ident">dtype</span>,
|
||||
<span class="prelude-val">Err</span>(<span class="kw">_</span>) => <span class="kw">break</span>,
|
||||
};
|
||||
<span class="kw">match</span> <span class="ident">dtype</span> {
|
||||
<span class="ident">virtio_input_decoder::DecodeType::Key</span>(<span class="ident">key</span>, <span class="ident">r#type</span>) => {
|
||||
<span class="kw">if</span> <span class="ident">r#type</span> <span class="op">==</span> <span class="ident">KeyType::Press</span> {
|
||||
<span class="kw">match</span> <span class="ident">key</span> {
|
||||
<span class="kw">_</span> => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
<span class="kw">_</span> => {}
|
||||
<span class="kw">fn</span> <span class="ident">is_empty</span>(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="ident">bool</span> {
|
||||
<span class="self">self</span>.<span class="ident">inner</span>.<span class="ident">exclusive_access</span>().<span class="ident">events</span>.<span class="ident">is_empty</span>()
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">read_event</span>(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="ident">u64</span> {
|
||||
<span class="kw">loop</span> {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">inner</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">inner</span>.<span class="ident">exclusive_access</span>();
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">event</span>) <span class="op">=</span> <span class="ident">inner</span>.<span class="ident">events</span>.<span class="ident">pop_front</span>() {
|
||||
<span class="kw">return</span> <span class="ident">event</span>;
|
||||
} <span class="kw">else</span> {
|
||||
<span class="kw">let</span> <span class="ident">task_cx_ptr</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">condvar</span>.<span class="ident">wait_no_sched</span>();
|
||||
<span class="ident">drop</span>(<span class="ident">inner</span>);
|
||||
<span class="ident">schedule</span>(<span class="ident">task_cx_ptr</span>);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="comment">// fn events(&self) -> &VecDeque<u64> {</span>
|
||||
<span class="comment">// &self.inner.exclusive_access().events</span>
|
||||
<span class="comment">// }</span>
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">handle_irq</span>(<span class="kw-2">&</span><span class="self">self</span>) {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">count</span> <span class="op">=</span> <span class="number">0</span>;
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">result</span> <span class="op">=</span> <span class="number">0</span>;
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">key</span> <span class="op">=</span> <span class="number">0</span>;
|
||||
<span class="self">self</span>.<span class="ident">inner</span>.<span class="ident">exclusive_session</span>(<span class="op">|</span><span class="ident">inner</span><span class="op">|</span> {
|
||||
<span class="ident">inner</span>.<span class="ident">virtio_input</span>.<span class="ident">ack_interrupt</span>();
|
||||
<span class="kw">while</span> <span class="kw">let</span> <span class="prelude-val">Some</span>((<span class="ident">token</span>, <span class="ident">event</span>)) <span class="op">=</span> <span class="ident">inner</span>.<span class="ident">virtio_input</span>.<span class="ident">pop_pending_event</span>() {
|
||||
<span class="ident">count</span> <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
|
||||
<span class="ident">key</span> <span class="op">=</span> <span class="ident">token</span>;
|
||||
<span class="ident">result</span> <span class="op">=</span> (<span class="ident">event</span>.<span class="ident">event_type</span> <span class="kw">as</span> <span class="ident">u64</span>) <span class="op"><</span><span class="op"><</span> <span class="number">48</span>
|
||||
<span class="op">|</span> (<span class="ident">event</span>.<span class="ident">code</span> <span class="kw">as</span> <span class="ident">u64</span>) <span class="op"><</span><span class="op"><</span> <span class="number">32</span>
|
||||
<span class="op">|</span> (<span class="ident">event</span>.<span class="ident">value</span>) <span class="kw">as</span> <span class="ident">u64</span>;
|
||||
<span class="ident">inner</span>.<span class="ident">events</span>.<span class="ident">push_back</span>(<span class="ident">result</span>);
|
||||
<span class="macro">println!</span>(<span class="string">"[KERN] inputdev_handle_irq: event: {:x}"</span>, <span class="ident">result</span>);
|
||||
}
|
||||
});
|
||||
<span class="kw">if</span> <span class="ident">count</span> <span class="op">></span> <span class="number">0</span> {
|
||||
<span class="comment">//self.condvars.get(&key).unwrap().signal();</span>
|
||||
<span class="self">self</span>.<span class="ident">condvar</span>.<span class="ident">signal</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>
|
@ -75,13 +75,14 @@
|
||||
<span id="75">75</span>
|
||||
<span id="76">76</span>
|
||||
<span id="77">77</span>
|
||||
<span id="78">78</span>
|
||||
</pre><pre class="rust"><code><span class="attribute">#![<span class="ident">no_std</span>]</span>
|
||||
<span class="attribute">#![<span class="ident">no_main</span>]</span>
|
||||
<span class="attribute">#![<span class="ident">feature</span>(<span class="ident">panic_info_message</span>)]</span>
|
||||
<span class="attribute">#![<span class="ident">feature</span>(<span class="ident">alloc_error_handler</span>)]</span>
|
||||
|
||||
<span class="comment">//use crate::drivers::{GPU_DEVICE, KEYBOARD_DEVICE, MOUSE_DEVICE, INPUT_CONDVAR};</span>
|
||||
<span class="kw">use</span> <span class="ident"><span class="kw">crate</span>::drivers</span>::{<span class="ident">GPU_DEVICE</span>, <span class="ident">KEYBOARD_DEVICE</span>, <span class="ident">MOUSE_DEVICE</span>};
|
||||
|
||||
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">alloc</span>;
|
||||
|
||||
<span class="attribute">#[<span class="ident">macro_use</span>]</span>
|
||||
@ -136,6 +137,7 @@
|
||||
<span class="ident">UART</span>.<span class="ident">init</span>();
|
||||
<span class="macro">println!</span>(<span class="string">"KERN: init gpu"</span>);
|
||||
<span class="kw">let</span> <span class="ident">_gpu</span> <span class="op">=</span> <span class="ident">GPU_DEVICE</span>.<span class="ident">clone</span>();
|
||||
<span class="comment">//let _input_condvar = INPUT_CONDVAR.clone();</span>
|
||||
<span class="macro">println!</span>(<span class="string">"KERN: init keyboard"</span>);
|
||||
<span class="kw">let</span> <span class="ident">_keyboard</span> <span class="op">=</span> <span class="ident">KEYBOARD_DEVICE</span>.<span class="ident">clone</span>();
|
||||
<span class="macro">println!</span>(<span class="string">"KERN: init mouse"</span>);
|
||||
|
35
ch9-gui-dev/src/os/syscall/input.rs.html
Normal file
35
ch9-gui-dev/src/os/syscall/input.rs.html
Normal file
@ -0,0 +1,35 @@
|
||||
<!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="Source of the Rust file `src/syscall/input.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>input.rs - source</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="../../../source-script.js"></script><script defer src="../../../source-files.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 source"><!--[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></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="example-wrap"><pre class="line-numbers"><span id="1">1</span>
|
||||
<span id="2">2</span>
|
||||
<span id="3">3</span>
|
||||
<span id="4">4</span>
|
||||
<span id="5">5</span>
|
||||
<span id="6">6</span>
|
||||
<span id="7">7</span>
|
||||
<span id="8">8</span>
|
||||
<span id="9">9</span>
|
||||
<span id="10">10</span>
|
||||
<span id="11">11</span>
|
||||
<span id="12">12</span>
|
||||
<span id="13">13</span>
|
||||
<span id="14">14</span>
|
||||
<span id="15">15</span>
|
||||
<span id="16">16</span>
|
||||
<span id="17">17</span>
|
||||
</pre><pre class="rust"><code><span class="comment">//use crate::drivers::{KEYBOARD_DEVICE,MOUSE_DEVICE,INPUT_CONDVAR,read_input_event};</span>
|
||||
<span class="kw">use</span> <span class="ident"><span class="kw">crate</span>::drivers</span>::{<span class="ident">KEYBOARD_DEVICE</span>,<span class="ident">MOUSE_DEVICE</span>};
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">sys_event_get</span>() -><span class="ident">isize</span> {
|
||||
<span class="kw">let</span> <span class="ident">kb</span> <span class="op">=</span> <span class="ident">KEYBOARD_DEVICE</span>.<span class="ident">clone</span>();
|
||||
<span class="kw">let</span> <span class="ident">mouse</span> <span class="op">=</span> <span class="ident">MOUSE_DEVICE</span>.<span class="ident">clone</span>();
|
||||
<span class="comment">//let input=INPUT_CONDVAR.clone();</span>
|
||||
<span class="comment">//read_input_event() as isize</span>
|
||||
<span class="kw">if</span> <span class="op">!</span><span class="ident">kb</span>.<span class="ident">is_empty</span>(){
|
||||
<span class="ident">kb</span>.<span class="ident">read_event</span>() <span class="kw">as</span> <span class="ident">isize</span>
|
||||
} <span class="kw">else</span> <span class="kw">if</span> <span class="op">!</span><span class="ident">mouse</span>.<span class="ident">is_empty</span>() {
|
||||
<span class="ident">mouse</span>.<span class="ident">read_event</span>() <span class="kw">as</span> <span class="ident">isize</span>
|
||||
} <span class="kw">else</span> {
|
||||
<span class="number">0</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>
|
@ -74,6 +74,10 @@
|
||||
<span id="74">74</span>
|
||||
<span id="75">75</span>
|
||||
<span id="76">76</span>
|
||||
<span id="77">77</span>
|
||||
<span id="78">78</span>
|
||||
<span id="79">79</span>
|
||||
<span id="80">80</span>
|
||||
</pre><pre class="rust"><code><span class="kw">const</span> <span class="ident">SYSCALL_DUP</span>: <span class="ident">usize</span> <span class="op">=</span> <span class="number">24</span>;
|
||||
<span class="kw">const</span> <span class="ident">SYSCALL_OPEN</span>: <span class="ident">usize</span> <span class="op">=</span> <span class="number">56</span>;
|
||||
<span class="kw">const</span> <span class="ident">SYSCALL_CLOSE</span>: <span class="ident">usize</span> <span class="op">=</span> <span class="number">57</span>;
|
||||
@ -103,18 +107,21 @@
|
||||
<span class="kw">const</span> <span class="ident">SYSCALL_CONDVAR_WAIT</span>: <span class="ident">usize</span> <span class="op">=</span> <span class="number">1032</span>;
|
||||
<span class="kw">const</span> <span class="ident">SYSCALL_FRAMEBUFFER</span>: <span class="ident">usize</span> <span class="op">=</span> <span class="number">2000</span>;
|
||||
<span class="kw">const</span> <span class="ident">SYSCALL_FRAMEBUFFER_FLUSH</span>: <span class="ident">usize</span> <span class="op">=</span> <span class="number">2001</span>;
|
||||
<span class="kw">const</span> <span class="ident">SYSCALL_EVENT_GET</span>: <span class="ident">usize</span> <span class="op">=</span> <span class="number">3000</span>;
|
||||
|
||||
<span class="kw">mod</span> <span class="ident">fs</span>;
|
||||
<span class="kw">mod</span> <span class="ident">process</span>;
|
||||
<span class="kw">mod</span> <span class="ident">sync</span>;
|
||||
<span class="kw">mod</span> <span class="ident">thread</span>;
|
||||
<span class="kw">mod</span> <span class="ident">gui</span>;
|
||||
<span class="kw">mod</span> <span class="ident">input</span>;
|
||||
|
||||
<span class="kw">use</span> <span class="ident">fs</span>::<span class="kw-2">*</span>;
|
||||
<span class="kw">use</span> <span class="ident">process</span>::<span class="kw-2">*</span>;
|
||||
<span class="kw">use</span> <span class="ident">sync</span>::<span class="kw-2">*</span>;
|
||||
<span class="kw">use</span> <span class="ident">thread</span>::<span class="kw-2">*</span>;
|
||||
<span class="kw">use</span> <span class="ident">gui</span>::<span class="kw-2">*</span>;
|
||||
<span class="kw">use</span> <span class="ident">input</span>::<span class="kw-2">*</span>;
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">syscall</span>(<span class="ident">syscall_id</span>: <span class="ident">usize</span>, <span class="ident">args</span>: [<span class="ident">usize</span>; <span class="number">3</span>]) -> <span class="ident">isize</span> {
|
||||
<span class="kw">match</span> <span class="ident">syscall_id</span> {
|
||||
@ -147,6 +154,7 @@
|
||||
<span class="ident">SYSCALL_CONDVAR_WAIT</span> => <span class="ident">sys_condvar_wait</span>(<span class="ident">args</span>[<span class="number">0</span>], <span class="ident">args</span>[<span class="number">1</span>]),
|
||||
<span class="ident">SYSCALL_FRAMEBUFFER</span> => <span class="ident">sys_framebuffer</span>(),
|
||||
<span class="ident">SYSCALL_FRAMEBUFFER_FLUSH</span> => <span class="ident">sys_framebuffer_flush</span>(),
|
||||
<span class="ident">SYSCALL_EVENT_GET</span> => <span class="ident">sys_event_get</span>(),
|
||||
<span class="kw">_</span> => <span class="macro">panic!</span>(<span class="string">"Unsupported syscall_id: {}"</span>, <span class="ident">syscall_id</span>),
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user