From 8b0078ac109bb2acc5fe5ecc3ee01f2ac6891b2f Mon Sep 17 00:00:00 2001 From: YdrMaster Date: Thu, 20 Oct 2022 03:52:59 +0000 Subject: [PATCH] deploy: 067e36524d7cfcc9b6eafa26bcb82c45364a9db1 --- ch4/ayu.css | 2 +- ch4/dark.css | 2 +- ch4/light.css | 2 +- ch4/main.js | 2 +- ch4/os/all.html | 9 +----- ch4/os/board/constant.CLOCK_FREQ.html | 10 +------ ch4/os/board/constant.EXIT_FAILURE.html | 10 +------ ch4/os/board/constant.EXIT_FAILURE_FLAG.html | 10 +------ ch4/os/board/constant.EXIT_RESET.html | 10 +------ ch4/os/board/constant.EXIT_SUCCESS.html | 10 +------ ch4/os/board/constant.MMIO.html | 10 +------ ch4/os/board/constant.QEMU_EXIT_HANDLE.html | 10 +------ ch4/os/board/constant.VIRT_TEST.html | 10 +------ ch4/os/board/fn.exit_code_encode.html | 12 ++------ ch4/os/board/index.html | 20 +++---------- ch4/os/board/struct.RISCV64.html | 16 +++------- ch4/os/board/trait.QEMUExit.html | 12 ++------ ch4/os/config/constant.KERNEL_HEAP_SIZE.html | 10 +------ ch4/os/config/constant.KERNEL_STACK_SIZE.html | 10 +------ ch4/os/config/constant.MEMORY_END.html | 10 +------ ch4/os/config/constant.PAGE_SIZE.html | 10 +------ ch4/os/config/constant.PAGE_SIZE_BITS.html | 10 +------ ch4/os/config/constant.TRAMPOLINE.html | 10 +------ ch4/os/config/constant.TRAP_CONTEXT.html | 10 +------ ch4/os/config/constant.USER_STACK_SIZE.html | 10 +------ ch4/os/config/fn.kernel_stack_position.html | 12 ++------ ch4/os/config/index.html | 17 ++--------- ch4/os/console/fn.print.html | 10 +------ ch4/os/console/index.html | 14 ++------- ch4/os/console/struct.Stdout.html | 16 +++------- ch4/os/fn.clear_bss.html | 12 ++------ ch4/os/fn.rust_main.html | 12 ++------ ch4/os/index.html | 21 ++++--------- ch4/os/lang_items/fn.panic.html | 12 ++------ ch4/os/lang_items/index.html | 15 ++-------- ch4/os/loader/fn.get_app_data.html | 12 ++------ ch4/os/loader/fn.get_num_app.html | 12 ++------ ch4/os/loader/index.html | 15 ++-------- ch4/os/macro.print.html | 12 ++------ ch4/os/macro.println.html | 12 ++------ ch4/os/mm/address/constant.PA_WIDTH_SV39.html | 12 ++------ .../mm/address/constant.PPN_WIDTH_SV39.html | 10 +------ ch4/os/mm/address/constant.VA_WIDTH_SV39.html | 10 +------ .../mm/address/constant.VPN_WIDTH_SV39.html | 10 +------ ch4/os/mm/address/index.html | 22 ++++---------- ch4/os/mm/address/struct.PhysAddr.html | 30 +++++++------------ ch4/os/mm/address/struct.PhysPageNum.html | 30 +++++++------------ ch4/os/mm/address/struct.SimpleRange.html | 16 +++------- .../address/struct.SimpleRangeIterator.html | 16 +++------- ch4/os/mm/address/struct.VirtAddr.html | 30 +++++++------------ ch4/os/mm/address/struct.VirtPageNum.html | 30 +++++++------------ ch4/os/mm/address/trait.StepByOne.html | 12 ++------ ch4/os/mm/address/type.VPNRange.html | 12 ++------ ch4/os/mm/fn.init.html | 12 ++------ ch4/os/mm/frame_allocator/fn.frame_alloc.html | 12 ++------ .../fn.frame_allocator_test.html | 12 ++------ .../mm/frame_allocator/fn.frame_dealloc.html | 12 ++------ .../fn.init_frame_allocator.html | 12 ++------ ch4/os/mm/frame_allocator/index.html | 20 +++---------- .../struct.FRAME_ALLOCATOR.html | 16 +++------- .../frame_allocator/struct.FrameTracker.html | 16 +++------- .../struct.StackFrameAllocator.html | 16 +++------- .../frame_allocator/trait.FrameAllocator.html | 12 ++------ .../type.FrameAllocatorImpl.html | 10 +------ .../heap_allocator/fn.handle_alloc_error.html | 12 ++------ ch4/os/mm/heap_allocator/fn.heap_test.html | 10 +------ ch4/os/mm/heap_allocator/fn.init_heap.html | 12 ++------ ch4/os/mm/heap_allocator/index.html | 18 +++-------- .../heap_allocator/static.HEAP_ALLOCATOR.html | 12 ++------ .../mm/heap_allocator/static.HEAP_SPACE.html | 12 ++------ ch4/os/mm/index.html | 19 +++--------- ch4/os/mm/memory_set/enum.MapType.html | 18 ++++------- ch4/os/mm/memory_set/fn.ebss.html | 10 +------ ch4/os/mm/memory_set/fn.edata.html | 10 +------ ch4/os/mm/memory_set/fn.ekernel.html | 10 +------ ch4/os/mm/memory_set/fn.erodata.html | 10 +------ ch4/os/mm/memory_set/fn.etext.html | 10 +------ ch4/os/mm/memory_set/fn.remap_test.html | 10 +------ ch4/os/mm/memory_set/fn.sbss_with_stack.html | 10 +------ ch4/os/mm/memory_set/fn.sdata.html | 10 +------ ch4/os/mm/memory_set/fn.srodata.html | 10 +------ ch4/os/mm/memory_set/fn.stext.html | 10 +------ ch4/os/mm/memory_set/fn.strampoline.html | 10 +------ ch4/os/mm/memory_set/index.html | 19 +++--------- ch4/os/mm/memory_set/struct.KERNEL_SPACE.html | 16 +++------- ch4/os/mm/memory_set/struct.MapArea.html | 16 +++------- .../mm/memory_set/struct.MapPermission.html | 30 +++++++------------ ch4/os/mm/memory_set/struct.MemorySet.html | 16 +++------- .../page_table/fn.translated_byte_buffer.html | 12 ++------ ch4/os/mm/page_table/index.html | 18 +++-------- ch4/os/mm/page_table/struct.PTEFlags.html | 30 +++++++------------ ch4/os/mm/page_table/struct.PageTable.html | 16 +++------- .../mm/page_table/struct.PageTableEntry.html | 16 +++------- ch4/os/sbi/constant.SBI_CONSOLE_PUTCHAR.html | 10 +------ ch4/os/sbi/constant.SBI_SET_TIMER.html | 10 +------ ch4/os/sbi/fn.console_putchar.html | 12 ++------ ch4/os/sbi/fn.sbi_call.html | 12 ++------ ch4/os/sbi/fn.set_timer.html | 12 ++------ ch4/os/sbi/fn.shutdown.html | 12 ++------ ch4/os/sbi/index.html | 16 ++-------- ch4/os/sync/index.html | 16 ++-------- ch4/os/sync/up/index.html | 15 ++-------- ch4/os/sync/up/struct.UPSafeCell.html | 16 +++------- ch4/os/syscall/constant.SYSCALL_EXIT.html | 10 +------ ch4/os/syscall/constant.SYSCALL_GET_TIME.html | 10 +------ ch4/os/syscall/constant.SYSCALL_WRITE.html | 10 +------ ch4/os/syscall/constant.SYSCALL_YIELD.html | 10 +------ ch4/os/syscall/fn.syscall.html | 12 ++------ ch4/os/syscall/fs/constant.FD_STDOUT.html | 10 +------ ch4/os/syscall/fs/fn.sys_write.html | 12 ++------ ch4/os/syscall/fs/index.html | 16 ++-------- ch4/os/syscall/index.html | 19 +++--------- ch4/os/syscall/process/fn.sys_exit.html | 12 ++------ ch4/os/syscall/process/fn.sys_get_time.html | 12 ++------ ch4/os/syscall/process/fn.sys_yield.html | 12 ++------ ch4/os/syscall/process/index.html | 15 ++-------- ch4/os/task/context/index.html | 15 ++-------- ch4/os/task/context/struct.TaskContext.html | 16 +++------- ch4/os/task/fn.current_trap_cx.html | 12 ++------ ch4/os/task/fn.current_user_token.html | 12 ++------ ch4/os/task/fn.exit_current_and_run_next.html | 12 ++------ ch4/os/task/fn.mark_current_exited.html | 12 ++------ ch4/os/task/fn.mark_current_suspended.html | 12 ++------ ch4/os/task/fn.run_first_task.html | 12 ++------ ch4/os/task/fn.run_next_task.html | 12 ++------ .../task/fn.suspend_current_and_run_next.html | 12 ++------ ch4/os/task/index.html | 21 ++++--------- ch4/os/task/struct.TASK_MANAGER.html | 16 +++------- ch4/os/task/struct.TaskContext.html | 16 +++------- ch4/os/task/struct.TaskManager.html | 16 +++------- ch4/os/task/struct.TaskManagerInner.html | 16 +++------- ch4/os/task/switch/fn.__switch.html | 12 ++------ ch4/os/task/switch/index.html | 15 ++-------- ch4/os/task/task/enum.TaskStatus.html | 18 ++++------- ch4/os/task/task/index.html | 18 +++-------- ch4/os/task/task/struct.TaskControlBlock.html | 16 +++------- ch4/os/timer/constant.MSEC_PER_SEC.html | 10 +------ ch4/os/timer/constant.TICKS_PER_SEC.html | 10 +------ ch4/os/timer/fn.get_time.html | 10 +------ ch4/os/timer/fn.get_time_ms.html | 12 ++------ ch4/os/timer/fn.set_next_trigger.html | 12 ++------ ch4/os/timer/index.html | 16 ++-------- ch4/os/trap/context/index.html | 15 ++-------- ch4/os/trap/context/struct.TrapContext.html | 16 +++------- ch4/os/trap/fn.enable_timer_interrupt.html | 12 ++------ ch4/os/trap/fn.init.html | 12 ++------ ch4/os/trap/fn.set_kernel_trap_entry.html | 10 +------ ch4/os/trap/fn.set_user_trap_entry.html | 10 +------ ch4/os/trap/fn.trap_from_kernel.html | 12 ++------ ch4/os/trap/fn.trap_handler.html | 12 ++------ ch4/os/trap/fn.trap_return.html | 12 ++------ ch4/os/trap/index.html | 21 ++++--------- ch4/os/trap/struct.TrapContext.html | 16 +++------- ch4/rustdoc.css | 2 +- ch4/search-index.js | 2 +- ch4/settings.css | 2 +- ch4/settings.html | 9 +----- ch4/source-files.js | 5 ++-- ch4/source-script.js | 2 +- ch4/src/os/boards/qemu.rs.html | 11 ++----- ch4/src/os/config.rs.html | 11 ++----- ch4/src/os/console.rs.html | 11 ++----- ch4/src/os/lang_items.rs.html | 11 ++----- ch4/src/os/loader.rs.html | 11 ++----- ch4/src/os/main.rs.html | 11 ++----- ch4/src/os/mm/address.rs.html | 11 ++----- ch4/src/os/mm/frame_allocator.rs.html | 11 ++----- ch4/src/os/mm/heap_allocator.rs.html | 11 ++----- ch4/src/os/mm/memory_set.rs.html | 11 ++----- ch4/src/os/mm/mod.rs.html | 11 ++----- ch4/src/os/mm/page_table.rs.html | 11 ++----- ch4/src/os/sbi.rs.html | 11 ++----- ch4/src/os/sync/mod.rs.html | 11 ++----- ch4/src/os/sync/up.rs.html | 11 ++----- ch4/src/os/syscall/fs.rs.html | 11 ++----- ch4/src/os/syscall/mod.rs.html | 11 ++----- ch4/src/os/syscall/process.rs.html | 11 ++----- ch4/src/os/task/context.rs.html | 11 ++----- ch4/src/os/task/mod.rs.html | 11 ++----- ch4/src/os/task/switch.rs.html | 11 ++----- ch4/src/os/task/task.rs.html | 11 ++----- ch4/src/os/timer.rs.html | 11 ++----- ch4/src/os/trap/context.rs.html | 11 ++----- ch4/src/os/trap/mod.rs.html | 11 ++----- 184 files changed, 456 insertions(+), 1884 deletions(-) diff --git a/ch4/ayu.css b/ch4/ayu.css index 3185957b..f98b3417 100644 --- a/ch4/ayu.css +++ b/ch4/ayu.css @@ -1 +1 @@ - :root{--main-background-color:#0f1419;--main-color:#c5c5c5;--settings-input-color:#ffb454;--sidebar-background-color:#14191f;--sidebar-background-color-hover:rgba(70,70,70,0.33);--code-block-background-color:#191f26;--scrollbar-track-background-color:transparent;--scrollbar-thumb-background-color:#5c6773;--scrollbar-color:#5c6773 #24292f;--headings-border-bottom-color:#5c6773;}.slider{background-color:#ccc;}.slider:before{background-color:white;}input:focus+.slider{box-shadow:0 0 0 2px #0a84ff,0 0 0 6px rgba(10,132,255,0.3);}h1,h2,h3,h4{color:white;}h1.fqn a{color:#fff;}h4{border:none;}.in-band{background-color:#0f1419;}.docblock code{color:#ffb454;}.code-header{color:#e6e1cf;}.docblock pre>code,pre>code{color:#e6e1cf;}span code{color:#e6e1cf;}.docblock a>code{color:#39AFD7 !important;}pre,.rustdoc.source .example-wrap{color:#e6e1cf;}.rust-logo{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);}.sidebar .current,.sidebar a:hover{background-color:transparent;color:#ffb44c;}.sidebar-elems .location{color:#ff7733;}.line-numbers span{color:#5c6773;}.line-numbers .line-highlighted{color:#708090;background-color:rgba(255,236,164,0.06);padding-right:4px;border-right:1px solid #ffb44c;}.docblock table td,.docblock table th{border-color:#5c6773;}.search-results a:hover{background-color:#777;}.search-results a:focus{color:#000 !important;background-color:#c6afb3;}.search-results a{color:#0096cf;}.search-results a div.desc{color:#c5c5c5;}.content .item-info::before{color:#ccc;}.content span.foreigntype,.content a.foreigntype{color:#ffa0a5;}.content span.union,.content a.union{color:#ffa0a5;}.content span.constant,.content a.constant,.content span.static,.content a.static{color:#39AFD7;}.content span.primitive,.content a.primitive{color:#ffa0a5;}.content span.traitalias,.content a.traitalias{color:#39AFD7;}.content span.keyword,.content a.keyword{color:#39AFD7;}.content span.externcrate,.content span.mod,.content a.mod{color:#39AFD7;}.content span.struct,.content a.struct{color:#ffa0a5;}.content span.enum,.content a.enum{color:#ffa0a5;}.content span.trait,.content a.trait{color:#39AFD7;}.content span.type,.content a.type{color:#39AFD7;}.content span.type,.content a.type,.block a.current.type{color:#39AFD7;}.content span.associatedtype,.content a.associatedtype,.block a.current.associatedtype{color:#39AFD7;}.content span.fn,.content a.fn,.content span.method,.content a.method,.content span.tymethod,.content a.tymethod,.content .fnname{color:#fdd687;}.content span.attr,.content a.attr,.content span.derive,.content a.derive,.content span.macro,.content a.macro{color:#a37acc;}.sidebar a{color:#53b1db;}.sidebar a.current.type{color:#53b1db;}.sidebar a.current.associatedtype{color:#53b1db;}pre.rust .comment{color:#788797;}pre.rust .doccomment{color:#a1ac88;}nav.main .current{border-top-color:#5c6773;border-bottom-color:#5c6773;}nav.main .separator{border:1px solid #5c6773;}a{color:#39AFD7;}.sidebar h2 a,.sidebar h3 a{color:white;}.search-results a{color:#0096cf;}body.source .example-wrap pre.rust a{background:#333;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before{color:#999;}details.rustdoc-toggle>summary::before{filter:invert(100%);}#crate-search,.search-input{background-color:#141920;border-color:#424c57 !important;}.search-input{color:#ffffff;}.module-item .stab,.import-item .stab{color:#000;}.stab.empty-impl{}.stab.unstable,.stab.deprecated,.stab.portability,.stab.empty-impl{color:#c5c5c5;background:#314559 !important;border-style:none !important;border-radius:4px;padding:3px 6px 3px 6px;}.stab.portability>code{color:#e6e1cf;background:none;}.rightside,.out-of-band{color:grey;}.result-name .primitive>i,.result-name .keyword>i{color:#788797;}.line-numbers :target{background-color:transparent;}pre.rust .number,pre.rust .string{color:#b8cc52;}pre.rust .kw,pre.rust .kw-2,pre.rust .prelude-ty,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .op,pre.rust .lifetime{color:#ff7733;}pre.rust .macro,pre.rust .macro-nonterminal{color:#a37acc;}pre.rust .question-mark{color:#ff9011;}pre.rust .self{color:#36a3d9;font-style:italic;}pre.rust .attribute{color:#e6e1cf;}pre.rust .attribute .ident,pre.rust .attribute .op{color:#e6e1cf;}.example-wrap>pre.line-number{color:#5c67736e;border:none;}a.test-arrow{font-size:100%;color:#788797;border-radius:4px;background-color:rgba(57,175,215,0.09);}a.test-arrow:hover{background-color:rgba(57,175,215,0.368);color:#c5c5c5;}.toggle-label,.code-attribute{color:#999;}:target{background:rgba(255,236,164,0.06);border-right:3px solid rgba(255,180,76,0.85);}pre.compile_fail{border-left:2px solid rgba(255,0,0,.4);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.4);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#39AFD7;}.tooltip::after{background-color:#314559;color:#c5c5c5;border:1px solid #5c6773;}.tooltip::before{border-color:transparent #314559 transparent transparent;}.notable-traits-tooltiptext{background-color:#314559;border-color:#5c6773;}.notable-traits-tooltiptext .notable{border-bottom-color:#5c6773;}#titles>button.selected{background-color:#141920 !important;border-bottom:1px solid #ffb44c !important;border-top:none;}#titles>button:not(.selected){background-color:transparent !important;border:none;}#titles>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}#titles>button>div.count{color:#888;}.search-input:focus{}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{}.content span.struct,.content a.struct,.block a.current.struct{}#titles>button:hover,#titles>button.selected{}.content span.typedef,.content a.typedef,.block a.current.typedef{}.content span.union,.content a.union,.block a.current.union{}pre.rust .lifetime{}.stab.unstable{}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){}.content span.enum,.content a.enum,.block a.current.enum{}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{}.content span.keyword,.content a.keyword,.block a.current.keyword{}pre.rust .comment{}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{}pre.rust .kw{}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{}pre.rust .doccomment{}.stab.deprecated{}.content a.attr,.content a.derive,.content a.macro{}.stab.portability{}.content span.primitive,.content a.primitive,.block a.current.primitive{}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{}pre.rust .kw-2,pre.rust .prelude-ty{}.content span.trait,.content a.trait,.block a.current.trait{}.search-results a:focus span{}a.result-trait:focus{}a.result-traitalias:focus{}a.result-mod:focus,a.result-externcrate:focus{}a.result-mod:focus{}a.result-externcrate:focus{}a.result-enum:focus{}a.result-struct:focus{}a.result-union:focus{}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{}a.result-type:focus{}a.result-associatedtype:focus{}a.result-foreigntype:focus{}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{}a.result-constant:focus,a.result-static:focus{}a.result-primitive:focus{}a.result-keyword:focus{}.sidebar a.current.enum{}.sidebar a.current.struct{}.sidebar a.current.foreigntype{}.sidebar a.current.attr,.sidebar a.current.derive,.sidebar a.current.macro{}.sidebar a.current.union{}.sidebar a.current.constant .sidebar a.current.static{}.sidebar a.current.primitive{}.sidebar a.current.externcrate .sidebar a.current.mod{}.sidebar a.current.trait{}.sidebar a.current.traitalias{}.sidebar a.current.fn,.sidebar a.current.method,.sidebar a.current.tymethod{}.sidebar a.current.keyword{}@media (max-width:700px){.sidebar-elems{border-right-color:#5c6773;}}kbd{color:#c5c5c5;background-color:#314559;border-color:#5c6773;border-bottom-color:#5c6773;box-shadow:inset 0 -1px 0 #5c6773;}#settings-menu>a,#help-button>button{border-color:#5c6773;background-color:#0f1419;color:#fff;}#settings-menu>a img{filter:invert(100);}.popover,.popover::before,#help-button span.top,#help-button span.bottom{border-color:#5c6773;}#copy-path{color:#fff;}#copy-path>img{filter:invert(70%);}#copy-path:hover>img{filter:invert(100%);}#settings-menu>a:hover,#settings-menu>a:focus,#help-button>button:hover,#help-button>button:focus{border-color:#e0e0e0;}#theme-choices{border-color:#5c6773;background-color:#0f1419;}#theme-choices>button:not(:first-child){border-top-color:#5c6773;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:rgba(110,110,110,0.33);}.search-results .result-name span.alias{color:#c5c5c5;}.search-results .result-name span.grey{color:#999;}#source-sidebar>.title{color:#fff;border-bottom-color:#5c6773;}#source-sidebar div.files>a:hover,details.dir-entry summary:hover,#source-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:#14191f;color:#ffb44c;}#source-sidebar div.files>a.selected{background-color:#14191f;color:#ffb44c;}.scraped-example-list .scrape-help{border-color:#aaa;color:#eee;}.scraped-example-list .scrape-help:hover{border-color:white;color:white;}.more-examples-toggle summary,.more-examples-toggle .hide-more{color:#999;}.scraped-example .example-wrap .rust span.highlight{background:rgb(91,59,1);}.scraped-example .example-wrap .rust span.highlight.focus{background:rgb(124,75,15);}.scraped-example:not(.expanded) .code-wrapper:before{background:linear-gradient(to bottom,rgba(15,20,25,1),rgba(15,20,25,0));}.scraped-example:not(.expanded) .code-wrapper:after{background:linear-gradient(to top,rgba(15,20,25,1),rgba(15,20,25,0));}.toggle-line-inner{background:#999;}.toggle-line:hover .toggle-line-inner{background:#c5c5c5;} \ No newline at end of file + :root{--main-background-color:#0f1419;--main-color:#c5c5c5;--settings-input-color:#ffb454;--sidebar-background-color:#14191f;--sidebar-background-color-hover:rgba(70,70,70,0.33);--code-block-background-color:#191f26;--scrollbar-track-background-color:transparent;--scrollbar-thumb-background-color:#5c6773;--scrollbar-color:#5c6773 #24292f;--headings-border-bottom-color:#5c6773;}.slider{background-color:#ccc;}.slider:before{background-color:white;}input:focus+.slider{box-shadow:0 0 0 2px #0a84ff,0 0 0 6px rgba(10,132,255,0.3);}h1,h2,h3,h4{color:white;}h1.fqn a{color:#fff;}h4{border:none;}.in-band{background-color:#0f1419;}.docblock code{color:#ffb454;}.code-header{color:#e6e1cf;}.docblock pre>code,pre>code{color:#e6e1cf;}span code{color:#e6e1cf;}.docblock a>code{color:#39AFD7 !important;}pre,.rustdoc.source .example-wrap{color:#e6e1cf;}.rust-logo{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);}.sidebar .current,.sidebar a:hover{background-color:transparent;color:#ffb44c;}.sidebar-elems .location{color:#ff7733;}.line-numbers span{color:#5c6773;}.line-numbers .line-highlighted{color:#708090;background-color:rgba(255,236,164,0.06);padding-right:4px;border-right:1px solid #ffb44c;}.docblock table td,.docblock table th{border-color:#5c6773;}.search-results a:hover{background-color:#777;}.search-results a:focus{color:#000 !important;background-color:#c6afb3;}.search-results a{color:#0096cf;}.search-results a div.desc{color:#c5c5c5;}.content .item-info::before{color:#ccc;}.content span.foreigntype,.content a.foreigntype{color:#ffa0a5;}.content span.union,.content a.union{color:#ffa0a5;}.content span.constant,.content a.constant,.content span.static,.content a.static{color:#39AFD7;}.content span.primitive,.content a.primitive{color:#ffa0a5;}.content span.traitalias,.content a.traitalias{color:#39AFD7;}.content span.keyword,.content a.keyword{color:#39AFD7;}.content span.externcrate,.content span.mod,.content a.mod{color:#39AFD7;}.content span.struct,.content a.struct{color:#ffa0a5;}.content span.enum,.content a.enum{color:#ffa0a5;}.content span.trait,.content a.trait{color:#39AFD7;}.content span.type,.content a.type{color:#39AFD7;}.content span.type,.content a.type,.block a.current.type{color:#39AFD7;}.content span.associatedtype,.content a.associatedtype,.block a.current.associatedtype{color:#39AFD7;}.content span.fn,.content a.fn,.content span.method,.content a.method,.content span.tymethod,.content a.tymethod,.content .fnname{color:#fdd687;}.content span.attr,.content a.attr,.content span.derive,.content a.derive,.content span.macro,.content a.macro{color:#a37acc;}.sidebar a{color:#53b1db;}.sidebar a.current.type{color:#53b1db;}.sidebar a.current.associatedtype{color:#53b1db;}pre.rust .comment{color:#788797;}pre.rust .doccomment{color:#a1ac88;}nav.main .current{border-top-color:#5c6773;border-bottom-color:#5c6773;}nav.main .separator{border:1px solid #5c6773;}a{color:#39AFD7;}.sidebar h2 a,.sidebar h3 a{color:white;}.search-results a{color:#0096cf;}body.source .example-wrap pre.rust a{background:#333;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before{color:#999;}details.rustdoc-toggle>summary::before{filter:invert(100%);}#crate-search,.search-input{background-color:#141920;border-color:#424c57;}#crate-search{border-color:#424c57 !important;}.search-input{color:#ffffff;}.module-item .stab,.import-item .stab{color:#000;}.stab.empty-impl{}.stab.must_implement{}.stab.unstable,.stab.deprecated,.stab.portability,.stab.empty-impl,.stab.must_implement{color:#c5c5c5;background:#314559 !important;border-style:none !important;border-radius:4px;padding:3px 6px 3px 6px;}.stab.portability>code{color:#e6e1cf;background:none;}.rightside,.out-of-band{color:grey;}.result-name .primitive>i,.result-name .keyword>i{color:#788797;}.line-numbers :target{background-color:transparent;}pre.rust .number,pre.rust .string{color:#b8cc52;}pre.rust .kw,pre.rust .kw-2,pre.rust .prelude-ty,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .op,pre.rust .lifetime{color:#ff7733;}pre.rust .macro,pre.rust .macro-nonterminal{color:#a37acc;}pre.rust .question-mark{color:#ff9011;}pre.rust .self{color:#36a3d9;font-style:italic;}pre.rust .attribute{color:#e6e1cf;}pre.rust .attribute .ident,pre.rust .attribute .op{color:#e6e1cf;}.example-wrap>pre.line-number{color:#5c67736e;border:none;}a.test-arrow{font-size:100%;color:#788797;border-radius:4px;background-color:rgba(57,175,215,0.09);}a.test-arrow:hover{background-color:rgba(57,175,215,0.368);color:#c5c5c5;}.toggle-label,.code-attribute{color:#999;}:target{background:rgba(255,236,164,0.06);border-right:3px solid rgba(255,180,76,0.85);}pre.compile_fail{border-left:2px solid rgba(255,0,0,.4);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.4);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#39AFD7;}.tooltip::after{background-color:#314559;color:#c5c5c5;border:1px solid #5c6773;}.tooltip::before{border-color:transparent #314559 transparent transparent;}.notable-traits-tooltiptext{background-color:#314559;border-color:#5c6773;}.notable-traits-tooltiptext .notable{border-bottom-color:#5c6773;}#titles>button.selected{background-color:#141920 !important;border-bottom:1px solid #ffb44c !important;border-top:none;}#titles>button:not(.selected){background-color:transparent !important;border:none;}#titles>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}#titles>button>div.count{color:#888;}.search-input:focus{}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{}.content span.struct,.content a.struct,.block a.current.struct{}#titles>button:hover,#titles>button.selected{}.content span.typedef,.content a.typedef,.block a.current.typedef{}.content span.union,.content a.union,.block a.current.union{}pre.rust .lifetime{}.stab.unstable{}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){}.content span.enum,.content a.enum,.block a.current.enum{}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{}.content span.keyword,.content a.keyword,.block a.current.keyword{}pre.rust .comment{}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{}pre.rust .kw{}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{}pre.rust .doccomment{}.stab.deprecated{}.content a.attr,.content a.derive,.content a.macro{}.stab.portability{}.content span.primitive,.content a.primitive,.block a.current.primitive{}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{}pre.rust .kw-2,pre.rust .prelude-ty{}.content span.trait,.content a.trait,.block a.current.trait{}.search-results a:focus span{}a.result-trait:focus{}a.result-traitalias:focus{}a.result-mod:focus,a.result-externcrate:focus{}a.result-mod:focus{}a.result-externcrate:focus{}a.result-enum:focus{}a.result-struct:focus{}a.result-union:focus{}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{}a.result-type:focus{}a.result-associatedtype:focus{}a.result-foreigntype:focus{}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{}a.result-constant:focus,a.result-static:focus{}a.result-primitive:focus{}a.result-keyword:focus{}.sidebar a.current.enum{}.sidebar a.current.struct{}.sidebar a.current.foreigntype{}.sidebar a.current.attr,.sidebar a.current.derive,.sidebar a.current.macro{}.sidebar a.current.union{}.sidebar a.current.constant .sidebar a.current.static{}.sidebar a.current.primitive{}.sidebar a.current.externcrate .sidebar a.current.mod{}.sidebar a.current.trait{}.sidebar a.current.traitalias{}.sidebar a.current.fn,.sidebar a.current.method,.sidebar a.current.tymethod{}.sidebar a.current.keyword{}@media (max-width:700px){.sidebar-elems{border-right-color:#5c6773;}}kbd{color:#c5c5c5;background-color:#314559;border-color:#5c6773;border-bottom-color:#5c6773;box-shadow:inset 0 -1px 0 #5c6773;}#settings-menu>a,#help-button>button{border-color:#5c6773;background-color:#0f1419;color:#fff;}#settings-menu>a img{filter:invert(100);}.popover,.popover::before,#help-button span.top,#help-button span.bottom{border-color:#5c6773;}#copy-path{color:#fff;}#copy-path>img{filter:invert(70%);}#copy-path:hover>img{filter:invert(100%);}#settings-menu>a:hover,#settings-menu>a:focus,#help-button>button:hover,#help-button>button:focus{border-color:#e0e0e0;}#theme-choices{border-color:#5c6773;background-color:#0f1419;}#theme-choices>button:not(:first-child){border-top-color:#5c6773;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:rgba(110,110,110,0.33);}.search-results .result-name span.alias{color:#c5c5c5;}.search-results .result-name span.grey{color:#999;}#source-sidebar>.title{color:#fff;border-bottom-color:#5c6773;}#source-sidebar div.files>a:hover,details.dir-entry summary:hover,#source-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:#14191f;color:#ffb44c;}#source-sidebar div.files>a.selected{background-color:#14191f;color:#ffb44c;}.scraped-example-list .scrape-help{border-color:#aaa;color:#eee;}.scraped-example-list .scrape-help:hover{border-color:white;color:white;}.more-examples-toggle summary,.more-examples-toggle .hide-more{color:#999;}.scraped-example .example-wrap .rust span.highlight{background:rgb(91,59,1);}.scraped-example .example-wrap .rust span.highlight.focus{background:rgb(124,75,15);}.scraped-example:not(.expanded) .code-wrapper:before{background:linear-gradient(to bottom,rgba(15,20,25,1),rgba(15,20,25,0));}.scraped-example:not(.expanded) .code-wrapper:after{background:linear-gradient(to top,rgba(15,20,25,1),rgba(15,20,25,0));}.toggle-line-inner{background:#999;}.toggle-line:hover .toggle-line-inner{background:#c5c5c5;} \ No newline at end of file diff --git a/ch4/dark.css b/ch4/dark.css index 9d9fef3e..242423d0 100644 --- a/ch4/dark.css +++ b/ch4/dark.css @@ -1 +1 @@ -:root{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;}.slider{background-color:#ccc;}.slider:before{background-color:white;}input:focus+.slider{box-shadow:0 0 0 2px #0a84ff,0 0 0 6px rgba(10,132,255,0.3);}.in-band{background-color:#353535;}.rust-logo{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff)}.sidebar .current,.sidebar a:hover{background:#444;}.line-numbers span{color:#3B91E2;}.line-numbers .line-highlighted{background-color:#0a042f !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5,.docblock h6{border-bottom-color:#DDD;}.docblock table td,.docblock table th{border-color:#ddd;}.search-results a:hover{background-color:#777;}.search-results a:focus{color:#eee !important;background-color:#616161;}.search-results a:focus span{color:#eee !important;}a.result-trait:focus{background-color:#013191;}a.result-traitalias:focus{background-color:#013191;}a.result-mod:focus,a.result-externcrate:focus{background-color:#884719;}a.result-enum:focus{background-color:#194e9f;}a.result-struct:focus{background-color:#194e9f;}a.result-union:focus{background-color:#194e9f;}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{background-color:#4950ed;}a.result-type:focus{background-color:#194e9f;}a.result-associatedtype:focus{background-color:#884719;}a.result-foreigntype:focus{background-color:#194e9f;}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{background-color:#217d1c;}a.result-constant:focus,a.result-static:focus{background-color:#884719;}a.result-primitive:focus{background-color:#194e9f;}a.result-keyword:focus{background-color:#884719;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#2dbfb8;}.content span.struct,.content a.struct,.block a.current.struct{color:#2dbfb8;}.content span.type,.content a.type,.block a.current.type{color:#2dbfb8;}.content span.associatedtype,.content a.associatedtype,.block a.current.associatedtype{color:#D2991D;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#2dbfb8;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#09bd00;}.content span.union,.content a.union,.block a.current.union{color:#2dbfb8;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#D2991D;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#2dbfb8;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#D2991D;}.content span.trait,.content a.trait,.block a.current.trait{color:#b78cf2;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#b78cf2;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#2BAB63;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#D2991D;}.sidebar a{color:#fdbf35;}.sidebar a.current.enum{color:#12ece2;}.sidebar a.current.struct{color:#12ece2;}.sidebar a.current.type{color:#12ece2;}.sidebar a.current.associatedtype{color:#fdbf35;}.sidebar a.current.foreigntype{color:#12ece2;}.sidebar a.current.attr,.sidebar a.current.derive,.sidebar a.current.macro{color:#0be900;}.sidebar a.current.union{color:#12ece2;}.sidebar a.current.constant .sidebar a.current.static{color:#fdbf35;}.sidebar a.current.primitive{color:#12ece2;}.sidebar a.current.externcrate .sidebar a.current.mod{color:#fdbf35;}.sidebar a.current.trait{color:#cca7ff;}.sidebar a.current.traitalias{color:#cca7ff;}.sidebar a.current.fn,.sidebar a.current.method,.sidebar a.current.tymethod{color:#32d479;}.sidebar a.current.keyword{color:#fdbf35;}pre.rust .comment{color:#8d8d8b;}pre.rust .doccomment{color:#8ca375;}nav.main .current{border-top-color:#eee;border-bottom-color:#eee;}nav.main .separator{border-color:#eee;}a{color:#D2991D;}body.source .example-wrap pre.rust a{background:#333;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before{color:#999;}details.rustdoc-toggle>summary::before{filter:invert(100%);}#crate-search,.search-input{color:#111;background-color:#f0f0f0;border-color:#f0f0f0 !important;}.search-input{border-color:#e0e0e0;}.search-input:focus{border-color:#008dfd;}.stab.empty-impl{background:#FFF5D6;border-color:#FFC600;color:#2f2f2f;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;color:#2f2f2f;}.stab.deprecated{background:#ffc4c4;border-color:#db7b7b;color:#2f2f2f;}.stab.portability{background:#F3DFFF;border-color:#b07bdb;color:#2f2f2f;}.stab.portability>code{background:none;}.rightside,.out-of-band{color:grey;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#ab8ac1;}pre.rust .kw-2,pre.rust .prelude-ty{color:#769acb;}pre.rust .number,pre.rust .string{color:#83a300;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#ee6868;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#d97f26;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#4a4949;}a.test-arrow{color:#dedede;background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label,.code-attribute{color:#999;}:target{background-color:#494a3d;border-right:3px solid #bb7410;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.8);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.8);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.8);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.8);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;border-color:#000;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#111;border-color:#777;}.notable-traits-tooltiptext .notable{border-bottom-color:#d2d2d2;}#titles>button:not(.selected){background-color:#252525;border-top-color:#252525;}#titles>button:hover,#titles>button.selected{border-top-color:#0089ff;background-color:#353535;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-elems{border-right-color:#000;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow:inset 0 -1px 0 #c6cbd1;}#settings-menu>a,#help-button>button{border-color:#e0e0e0;background:#f0f0f0;color:#000;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button>button:hover,#help-button>button:focus{border-color:#ffb900;}.popover,.popover::before,#help-button span.top,#help-button span.bottom{border-color:#d2d2d2;}#copy-path{color:#999;}#copy-path>img{filter:invert(50%);}#copy-path:hover>img{filter:invert(65%);}#theme-choices{border-color:#e0e0e0;background-color:#353535;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#4e4e4e;}.search-results .result-name span.alias{color:#fff;}.search-results .result-name span.grey{color:#ccc;}#source-sidebar>.title{border-bottom-color:#ccc;}#source-sidebar div.files>a:hover,details.dir-entry summary:hover,#source-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:#444;}#source-sidebar div.files>a.selected{background-color:#333;}.scraped-example-list .scrape-help{border-color:#aaa;color:#eee;}.scraped-example-list .scrape-help:hover{border-color:white;color:white;}.more-examples-toggle summary,.more-examples-toggle .hide-more{color:#999;}.scraped-example .example-wrap .rust span.highlight{background:rgb(91,59,1);}.scraped-example .example-wrap .rust span.highlight.focus{background:rgb(124,75,15);}.scraped-example:not(.expanded) .code-wrapper:before{background:linear-gradient(to bottom,rgba(53,53,53,1),rgba(53,53,53,0));}.scraped-example:not(.expanded) .code-wrapper:after{background:linear-gradient(to top,rgba(53,53,53,1),rgba(53,53,53,0));}.toggle-line-inner{background:#999;}.toggle-line:hover .toggle-line-inner{background:#c5c5c5;} \ No newline at end of file +:root{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;}.slider{background-color:#ccc;}.slider:before{background-color:white;}input:focus+.slider{box-shadow:0 0 0 2px #0a84ff,0 0 0 6px rgba(10,132,255,0.3);}.in-band{background-color:#353535;}.rust-logo{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff)}.sidebar .current,.sidebar a:hover{background:#444;}.line-numbers span{color:#3B91E2;}.line-numbers .line-highlighted{background-color:#0a042f !important;}.docblock table td,.docblock table th{border-color:#ddd;}.search-results a:hover{background-color:#777;}.search-results a:focus{color:#eee !important;background-color:#616161;}.search-results a:focus span{color:#eee !important;}a.result-trait:focus{background-color:#013191;}a.result-traitalias:focus{background-color:#013191;}a.result-mod:focus,a.result-externcrate:focus{background-color:#884719;}a.result-enum:focus{background-color:#194e9f;}a.result-struct:focus{background-color:#194e9f;}a.result-union:focus{background-color:#194e9f;}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{background-color:#4950ed;}a.result-type:focus{background-color:#194e9f;}a.result-associatedtype:focus{background-color:#884719;}a.result-foreigntype:focus{background-color:#194e9f;}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{background-color:#217d1c;}a.result-constant:focus,a.result-static:focus{background-color:#884719;}a.result-primitive:focus{background-color:#194e9f;}a.result-keyword:focus{background-color:#884719;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#2dbfb8;}.content span.struct,.content a.struct,.block a.current.struct{color:#2dbfb8;}.content span.type,.content a.type,.block a.current.type{color:#2dbfb8;}.content span.associatedtype,.content a.associatedtype,.block a.current.associatedtype{color:#D2991D;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#2dbfb8;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#09bd00;}.content span.union,.content a.union,.block a.current.union{color:#2dbfb8;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#D2991D;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#2dbfb8;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#D2991D;}.content span.trait,.content a.trait,.block a.current.trait{color:#b78cf2;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#b78cf2;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#2BAB63;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#D2991D;}.sidebar a{color:#fdbf35;}.sidebar a.current.enum{color:#12ece2;}.sidebar a.current.struct{color:#12ece2;}.sidebar a.current.type{color:#12ece2;}.sidebar a.current.associatedtype{color:#fdbf35;}.sidebar a.current.foreigntype{color:#12ece2;}.sidebar a.current.attr,.sidebar a.current.derive,.sidebar a.current.macro{color:#0be900;}.sidebar a.current.union{color:#12ece2;}.sidebar a.current.constant .sidebar a.current.static{color:#fdbf35;}.sidebar a.current.primitive{color:#12ece2;}.sidebar a.current.externcrate .sidebar a.current.mod{color:#fdbf35;}.sidebar a.current.trait{color:#cca7ff;}.sidebar a.current.traitalias{color:#cca7ff;}.sidebar a.current.fn,.sidebar a.current.method,.sidebar a.current.tymethod{color:#32d479;}.sidebar a.current.keyword{color:#fdbf35;}pre.rust .comment{color:#8d8d8b;}pre.rust .doccomment{color:#8ca375;}nav.main .current{border-top-color:#eee;border-bottom-color:#eee;}nav.main .separator{border-color:#eee;}a{color:#D2991D;}body.source .example-wrap pre.rust a{background:#333;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before{color:#999;}details.rustdoc-toggle>summary::before{filter:invert(100%);}#crate-search,.search-input{color:#111;background-color:#f0f0f0;border-color:#f0f0f0;}#crate-search{border-color:#f0f0f0 !important;}.search-input{border-color:#e0e0e0;}.search-input:focus{border-color:#008dfd;}.stab.empty-impl{background:#FFF5D6;border-color:#FFC600;color:#2f2f2f;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;color:#2f2f2f;}.stab.deprecated{background:#ffc4c4;border-color:#db7b7b;color:#2f2f2f;}.stab.must_implement{background:#F3DFFF;border-color:#b07bdb;color:#2f2f2f;}.stab.portability{background:#F3DFFF;border-color:#b07bdb;color:#2f2f2f;}.stab.portability>code{background:none;}.rightside,.out-of-band{color:grey;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#ab8ac1;}pre.rust .kw-2,pre.rust .prelude-ty{color:#769acb;}pre.rust .number,pre.rust .string{color:#83a300;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#ee6868;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#d97f26;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#4a4949;}a.test-arrow{color:#dedede;background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label,.code-attribute{color:#999;}:target{background-color:#494a3d;border-right:3px solid #bb7410;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.8);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.8);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.8);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.8);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;border-color:#000;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#111;border-color:#777;}.notable-traits-tooltiptext .notable{border-bottom-color:#d2d2d2;}#titles>button:not(.selected){background-color:#252525;border-top-color:#252525;}#titles>button:hover,#titles>button.selected{border-top-color:#0089ff;background-color:#353535;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-elems{border-right-color:#000;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow:inset 0 -1px 0 #c6cbd1;}#settings-menu>a,#help-button>button{border-color:#e0e0e0;background:#f0f0f0;color:#000;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button>button:hover,#help-button>button:focus{border-color:#ffb900;}.popover,.popover::before,#help-button span.top,#help-button span.bottom{border-color:#d2d2d2;}#copy-path{color:#999;}#copy-path>img{filter:invert(50%);}#copy-path:hover>img{filter:invert(65%);}#theme-choices{border-color:#e0e0e0;background-color:#353535;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#4e4e4e;}.search-results .result-name span.alias{color:#fff;}.search-results .result-name span.grey{color:#ccc;}#source-sidebar>.title{border-bottom-color:#ccc;}#source-sidebar div.files>a:hover,details.dir-entry summary:hover,#source-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:#444;}#source-sidebar div.files>a.selected{background-color:#333;}.scraped-example-list .scrape-help{border-color:#aaa;color:#eee;}.scraped-example-list .scrape-help:hover{border-color:white;color:white;}.more-examples-toggle summary,.more-examples-toggle .hide-more{color:#999;}.scraped-example .example-wrap .rust span.highlight{background:rgb(91,59,1);}.scraped-example .example-wrap .rust span.highlight.focus{background:rgb(124,75,15);}.scraped-example:not(.expanded) .code-wrapper:before{background:linear-gradient(to bottom,rgba(53,53,53,1),rgba(53,53,53,0));}.scraped-example:not(.expanded) .code-wrapper:after{background:linear-gradient(to top,rgba(53,53,53,1),rgba(53,53,53,0));}.toggle-line-inner{background:#999;}.toggle-line:hover .toggle-line-inner{background:#c5c5c5;} \ No newline at end of file diff --git a/ch4/light.css b/ch4/light.css index 2d072f5f..a71085b0 100644 --- a/ch4/light.css +++ b/ch4/light.css @@ -1 +1 @@ -:root{--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--sidebar-background-color:#F5F5F5;--sidebar-background-color-hover:#E0E0E0;--code-block-background-color:#F5F5F5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;}.slider{background-color:#ccc;}.slider:before{background-color:white;}input:focus+.slider{box-shadow:0 0 0 2px #0a84ff,0 0 0 6px rgba(10,132,255,0.3);}.in-band{background-color:white;}.rust-logo{}.sidebar .current,.sidebar a:hover{background-color:#fff;}.line-numbers span{color:#c67e2d;}.line-numbers .line-highlighted{background-color:#FDFFD3 !important;}.docblock table td,.docblock table th{border-color:#ddd;}.search-results a:hover{background-color:#ddd;}.search-results a:focus{color:#000 !important;background-color:#ccc;}.search-results a:focus span{color:#000 !important;}a.result-trait:focus{background-color:#c7b6ff;}a.result-traitalias:focus{background-color:#c7b6ff;}a.result-mod:focus,a.result-externcrate:focus{background-color:#afc6e4;}a.result-enum:focus{background-color:#e7b1a0;}a.result-struct:focus{background-color:#e7b1a0;}a.result-union:focus{background-color:#e7b1a0;}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{background-color:#c6afb3;}a.result-type:focus{background-color:#e7b1a0;}a.result-associatedtype:focus{background-color:#afc6e4;}a.result-foreigntype:focus{background-color:#e7b1a0;}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{background-color:#8ce488;}a.result-constant:focus,a.result-static:focus{background-color:#afc6e4;}a.result-primitive:focus{background-color:#e7b1a0;}a.result-keyword:focus{background-color:#afc6e4;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#AD378A;}.content span.struct,.content a.struct,.block a.current.struct{color:#AD378A;}.content span.type,.content a.type,.block a.current.type{color:#AD378A;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#3873AD;}.content span.associatedtype,.content a.associatedtype,.block a.current.associatedtype{color:#3873AD;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#068000;}.content span.union,.content a.union,.block a.current.union{color:#AD378A;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#3873AD;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#AD378A;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#3873AD;}.content span.trait,.content a.trait,.block a.current.trait{color:#6E4FC9;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#5137AD;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#AD7C37;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#3873AD;}.sidebar a{color:#356da4;}.sidebar a.current.enum{color:#a63283;}.sidebar a.current.struct{color:#a63283;}.sidebar a.current.type{color:#a63283;}.sidebar a.current.associatedtype{color:#356da4;}.sidebar a.current.foreigntype{color:#356da4;}.sidebar a.current.attr,.sidebar a.current.derive,.sidebar a.current.macro{color:#067901;}.sidebar a.current.union{color:#a63283;}.sidebar a.current.constant .sidebar a.current.static{color:#356da4;}.sidebar a.current.primitive{color:#a63283;}.sidebar a.current.externcrate .sidebar a.current.mod{color:#356da4;}.sidebar a.current.trait{color:#6849c3;}.sidebar a.current.traitalias{color:#4b349e;}.sidebar a.current.fn,.sidebar a.current.method,.sidebar a.current.tymethod{color:#a67736;}.sidebar a.current.keyword{color:#356da4;}nav.main .current{border-top-color:#000;border-bottom-color:#000;}nav.main .separator{border:1px solid #000;}a{color:#3873AD;}body.source .example-wrap pre.rust a{background:#eee;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before{color:#999;}#crate-search,.search-input{background-color:white;border-color:#e0e0e0 !important;}.search-input:focus{border-color:#66afe9;}.stab.empty-impl{background:#FFF5D6;border-color:#FFC600;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;}.stab.deprecated{background:#ffc4c4;border-color:#db7b7b;}.stab.portability{background:#F3DFFF;border-color:#b07bdb;}.stab.portability>code{background:none;}.rightside,.out-of-band{color:grey;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#8959A8;}pre.rust .kw-2,pre.rust .prelude-ty{color:#4271AE;}pre.rust .number,pre.rust .string{color:#718C00;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#C82829;}pre.rust .comment{color:#8E908C;}pre.rust .doccomment{color:#4D4D4C;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#B76514;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#c7c7c7;}a.test-arrow{color:#f5f5f5;background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label,.code-attribute{color:#999;}:target{background:#FDFFD3;border-right:3px solid #AD7C37;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.5);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.5);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#3873AD;}.tooltip::after{background-color:#000;color:#fff;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#eee;border-color:#999;}.notable-traits-tooltiptext .notable{border-bottom-color:#DDDDDD;}#titles>button:not(.selected){background-color:#e6e6e6;border-top-color:#e6e6e6;}#titles>button:hover,#titles>button.selected{background-color:#ffffff;border-top-color:#0089ff;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-elems{border-right-color:#000;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow:inset 0 -1px 0 #c6cbd1;}#settings-menu>a,#help-button>button{border-color:#e0e0e0;background-color:#fff;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button>button:hover,#help-button>button:focus{border-color:#717171;}.popover,.popover::before,#help-button span.top,#help-button span.bottom{border-color:#DDDDDD;}#copy-path{color:#999;}#copy-path>img{filter:invert(50%);}#copy-path:hover>img{filter:invert(35%);}#theme-choices{border-color:#ccc;background-color:#fff;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#eee;}.search-results .result-name span.alias{color:#000;}.search-results .result-name span.grey{color:#999;}#source-sidebar>.title{border-bottom-color:#ccc;}#source-sidebar div.files>a:hover,details.dir-entry summary:hover,#source-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:#E0E0E0;}#source-sidebar div.files>a.selected{background-color:#fff;}.scraped-example-list .scrape-help{border-color:#555;color:#333;}.scraped-example-list .scrape-help:hover{border-color:black;color:black;}.more-examples-toggle summary,.more-examples-toggle .hide-more{color:#999;}.scraped-example .example-wrap .rust span.highlight{background:#fcffd6;}.scraped-example .example-wrap .rust span.highlight.focus{background:#f6fdb0;}.scraped-example:not(.expanded) .code-wrapper:before{background:linear-gradient(to bottom,rgba(255,255,255,1),rgba(255,255,255,0));}.scraped-example:not(.expanded) .code-wrapper:after{background:linear-gradient(to top,rgba(255,255,255,1),rgba(255,255,255,0));}.toggle-line-inner{background:#ccc;}.toggle-line:hover .toggle-line-inner{background:#999;} \ No newline at end of file +:root{--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--sidebar-background-color:#F5F5F5;--sidebar-background-color-hover:#E0E0E0;--code-block-background-color:#F5F5F5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;}.slider{background-color:#ccc;}.slider:before{background-color:white;}input:focus+.slider{box-shadow:0 0 0 2px #0a84ff,0 0 0 6px rgba(10,132,255,0.3);}.in-band{background-color:white;}.rust-logo{}.sidebar .current,.sidebar a:hover{background-color:#fff;}.line-numbers span{color:#c67e2d;}.line-numbers .line-highlighted{background-color:#FDFFD3 !important;}.docblock table td,.docblock table th{border-color:#ddd;}.search-results a:hover{background-color:#ddd;}.search-results a:focus{color:#000 !important;background-color:#ccc;}.search-results a:focus span{color:#000 !important;}a.result-trait:focus{background-color:#c7b6ff;}a.result-traitalias:focus{background-color:#c7b6ff;}a.result-mod:focus,a.result-externcrate:focus{background-color:#afc6e4;}a.result-enum:focus{background-color:#e7b1a0;}a.result-struct:focus{background-color:#e7b1a0;}a.result-union:focus{background-color:#e7b1a0;}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{background-color:#c6afb3;}a.result-type:focus{background-color:#e7b1a0;}a.result-associatedtype:focus{background-color:#afc6e4;}a.result-foreigntype:focus{background-color:#e7b1a0;}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{background-color:#8ce488;}a.result-constant:focus,a.result-static:focus{background-color:#afc6e4;}a.result-primitive:focus{background-color:#e7b1a0;}a.result-keyword:focus{background-color:#afc6e4;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#AD378A;}.content span.struct,.content a.struct,.block a.current.struct{color:#AD378A;}.content span.type,.content a.type,.block a.current.type{color:#AD378A;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#3873AD;}.content span.associatedtype,.content a.associatedtype,.block a.current.associatedtype{color:#3873AD;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#068000;}.content span.union,.content a.union,.block a.current.union{color:#AD378A;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#3873AD;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#AD378A;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#3873AD;}.content span.trait,.content a.trait,.block a.current.trait{color:#6E4FC9;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#5137AD;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#AD7C37;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#3873AD;}.sidebar a{color:#356da4;}.sidebar a.current.enum{color:#a63283;}.sidebar a.current.struct{color:#a63283;}.sidebar a.current.type{color:#a63283;}.sidebar a.current.associatedtype{color:#356da4;}.sidebar a.current.foreigntype{color:#356da4;}.sidebar a.current.attr,.sidebar a.current.derive,.sidebar a.current.macro{color:#067901;}.sidebar a.current.union{color:#a63283;}.sidebar a.current.constant .sidebar a.current.static{color:#356da4;}.sidebar a.current.primitive{color:#a63283;}.sidebar a.current.externcrate .sidebar a.current.mod{color:#356da4;}.sidebar a.current.trait{color:#6849c3;}.sidebar a.current.traitalias{color:#4b349e;}.sidebar a.current.fn,.sidebar a.current.method,.sidebar a.current.tymethod{color:#a67736;}.sidebar a.current.keyword{color:#356da4;}nav.main .current{border-top-color:#000;border-bottom-color:#000;}nav.main .separator{border:1px solid #000;}a{color:#3873AD;}body.source .example-wrap pre.rust a{background:#eee;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before{color:#999;}#crate-search,.search-input{background-color:white;border-color:#e0e0e0;}#crate-search{border-color:#e0e0e0 !important;}.search-input:focus{border-color:#66afe9;}.stab.empty-impl{background:#FFF5D6;border-color:#FFC600;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;}.stab.deprecated{background:#ffc4c4;border-color:#db7b7b;}.stab.must_implement{background:#F3DFFF;border-color:#b07bdb;}.stab.portability{background:#F3DFFF;border-color:#b07bdb;}.stab.portability>code{background:none;}.rightside,.out-of-band{color:grey;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#8959A8;}pre.rust .kw-2,pre.rust .prelude-ty{color:#4271AE;}pre.rust .number,pre.rust .string{color:#718C00;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#C82829;}pre.rust .comment{color:#8E908C;}pre.rust .doccomment{color:#4D4D4C;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#B76514;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#c7c7c7;}a.test-arrow{color:#f5f5f5;background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label,.code-attribute{color:#999;}:target{background:#FDFFD3;border-right:3px solid #AD7C37;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.5);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.5);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#3873AD;}.tooltip::after{background-color:#000;color:#fff;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#eee;border-color:#999;}.notable-traits-tooltiptext .notable{border-bottom-color:#DDDDDD;}#titles>button:not(.selected){background-color:#e6e6e6;border-top-color:#e6e6e6;}#titles>button:hover,#titles>button.selected{background-color:#ffffff;border-top-color:#0089ff;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-elems{border-right-color:#000;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow:inset 0 -1px 0 #c6cbd1;}#settings-menu>a,#help-button>button{border-color:#e0e0e0;background-color:#fff;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button>button:hover,#help-button>button:focus{border-color:#717171;}.popover,.popover::before,#help-button span.top,#help-button span.bottom{border-color:#DDDDDD;}#copy-path{color:#999;}#copy-path>img{filter:invert(50%);}#copy-path:hover>img{filter:invert(35%);}#theme-choices{border-color:#ccc;background-color:#fff;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#eee;}.search-results .result-name span.alias{color:#000;}.search-results .result-name span.grey{color:#999;}#source-sidebar>.title{border-bottom-color:#ccc;}#source-sidebar div.files>a:hover,details.dir-entry summary:hover,#source-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:#E0E0E0;}#source-sidebar div.files>a.selected{background-color:#fff;}.scraped-example-list .scrape-help{border-color:#555;color:#333;}.scraped-example-list .scrape-help:hover{border-color:black;color:black;}.more-examples-toggle summary,.more-examples-toggle .hide-more{color:#999;}.scraped-example .example-wrap .rust span.highlight{background:#fcffd6;}.scraped-example .example-wrap .rust span.highlight.focus{background:#f6fdb0;}.scraped-example:not(.expanded) .code-wrapper:before{background:linear-gradient(to bottom,rgba(255,255,255,1),rgba(255,255,255,0));}.scraped-example:not(.expanded) .code-wrapper:after{background:linear-gradient(to top,rgba(255,255,255,1),rgba(255,255,255,0));}.toggle-line-inner{background:#ccc;}.toggle-line:hover .toggle-line-inner{background:#999;} \ No newline at end of file diff --git a/ch4/main.js b/ch4/main.js index c13781ff..c2141ac5 100644 --- a/ch4/main.js +++ b/ch4/main.js @@ -3,6 +3,6 @@ restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ enum, trait, type, macro, \ and const.","Search functions by type signature (e.g., vec -> usize or \ - * -> vec)","Search multiple things at once by splitting your query with comma (e.g., \ + -> vec)","Search multiple things at once by splitting your query with comma (e.g., \ str,u8 or String,struct:Vec,test)","You can look for items with an exact name by putting double quotes around \ your request: \"string\"","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");const div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;const rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";const rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);const container=document.createElement("div");container.className="popover";container.style.display="none";const side_by_side=document.createElement("div");side_by_side.className="side-by-side";side_by_side.appendChild(div_shortcuts);side_by_side.appendChild(div_infos);container.appendChild(book_info);container.appendChild(side_by_side);container.appendChild(rustdoc_version);const help_button=getHelpButton();help_button.appendChild(container);container.onblur=helpBlurHandler;container.onclick=event=>{event.preventDefault()};help_button.onblur=helpBlurHandler;help_button.children[0].onblur=helpBlurHandler;return container}window.hidePopoverMenus=function(){onEachLazy(document.querySelectorAll(".search-container .popover"),elem=>{elem.style.display="none"})};function getHelpMenu(buildNeeded){let menu=getHelpButton().querySelector(".popover");if(!menu&&buildNeeded){menu=buildHelpMenu()}return menu}function showHelp(){const menu=getHelpMenu(true);if(menu.style.display==="none"){window.hidePopoverMenus();menu.style.display=""}}document.querySelector(`#${HELP_BUTTON_ID} > button`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="BUTTON"||target.parentElement.id!==HELP_BUTTON_ID){return}const menu=getHelpMenu(true);const shouldShowHelp=menu.style.display==="none";if(shouldShowHelp){showHelp()}else{window.hidePopoverMenus()}});setMobileTopbar();addSidebarItems();addSidebarCrates();onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){let reset_button_timeout=null;window.copy_path=but=>{const parent=but.parentElement;const path=[];onEach(parent.childNodes,child=>{if(child.tagName==="A"){path.push(child.textContent)}});const el=document.createElement("textarea");el.value=path.join("::");el.setAttribute("readonly","");el.style.position="absolute";el.style.left="-9999px";document.body.appendChild(el);el.select();document.execCommand("copy");document.body.removeChild(el);but.children[0].style.display="none";let tmp;if(but.childNodes.length<2){tmp=document.createTextNode("✓");but.appendChild(tmp)}else{onEachLazy(but.childNodes,e=>{if(e.nodeType===Node.TEXT_NODE){tmp=e;return true}});tmp.textContent="✓"}if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){tmp.textContent="";reset_button_timeout=null;but.children[0].style.display=""}reset_button_timeout=window.setTimeout(reset_button,1000)}}()) \ No newline at end of file diff --git a/ch4/os/all.html b/ch4/os/all.html index d23e229c..0ef8aa74 100644 --- a/ch4/os/all.html +++ b/ch4/os/all.html @@ -1,8 +1 @@ -List of all items in this crate -

List of all items

Structs

Enums

Traits

Macros

Functions

Typedefs

Statics

Constants

- \ No newline at end of file +List of all items in this crate

List of all items

Structs

Enums

Traits

Macros

Functions

Typedefs

Statics

Constants

\ No newline at end of file diff --git a/ch4/os/board/constant.CLOCK_FREQ.html b/ch4/os/board/constant.CLOCK_FREQ.html index 31554126..f2024d8e 100644 --- a/ch4/os/board/constant.CLOCK_FREQ.html +++ b/ch4/os/board/constant.CLOCK_FREQ.html @@ -1,9 +1 @@ -CLOCK_FREQ in os::board - Rust -
-

Constant os::board::CLOCK_FREQ

source · []
pub const CLOCK_FREQ: usize = 12500000;
- \ No newline at end of file +CLOCK_FREQ in os::board - Rust
pub const CLOCK_FREQ: usize = 12500000;
\ No newline at end of file diff --git a/ch4/os/board/constant.EXIT_FAILURE.html b/ch4/os/board/constant.EXIT_FAILURE.html index 2d7b48d4..63c57814 100644 --- a/ch4/os/board/constant.EXIT_FAILURE.html +++ b/ch4/os/board/constant.EXIT_FAILURE.html @@ -1,9 +1 @@ -EXIT_FAILURE in os::board - Rust -
-

Constant os::board::EXIT_FAILURE

source · []
const EXIT_FAILURE: u32 = _; // 78_643u32
- \ No newline at end of file +EXIT_FAILURE in os::board - Rust
const EXIT_FAILURE: u32 = _; // 78_643u32
\ No newline at end of file diff --git a/ch4/os/board/constant.EXIT_FAILURE_FLAG.html b/ch4/os/board/constant.EXIT_FAILURE_FLAG.html index 2e764d30..edd3b3d9 100644 --- a/ch4/os/board/constant.EXIT_FAILURE_FLAG.html +++ b/ch4/os/board/constant.EXIT_FAILURE_FLAG.html @@ -1,9 +1 @@ -EXIT_FAILURE_FLAG in os::board - Rust -
const EXIT_FAILURE_FLAG: u32 = 0x3333;
- \ No newline at end of file +EXIT_FAILURE_FLAG in os::board - Rust
const EXIT_FAILURE_FLAG: u32 = 0x3333;
\ No newline at end of file diff --git a/ch4/os/board/constant.EXIT_RESET.html b/ch4/os/board/constant.EXIT_RESET.html index 3ed182bb..f9e7b284 100644 --- a/ch4/os/board/constant.EXIT_RESET.html +++ b/ch4/os/board/constant.EXIT_RESET.html @@ -1,9 +1 @@ -EXIT_RESET in os::board - Rust -
-

Constant os::board::EXIT_RESET

source · []
const EXIT_RESET: u32 = 0x7777;
- \ No newline at end of file +EXIT_RESET in os::board - Rust
const EXIT_RESET: u32 = 0x7777;
\ No newline at end of file diff --git a/ch4/os/board/constant.EXIT_SUCCESS.html b/ch4/os/board/constant.EXIT_SUCCESS.html index 8727f33a..dc0585d5 100644 --- a/ch4/os/board/constant.EXIT_SUCCESS.html +++ b/ch4/os/board/constant.EXIT_SUCCESS.html @@ -1,9 +1 @@ -EXIT_SUCCESS in os::board - Rust -
-

Constant os::board::EXIT_SUCCESS

source · []
const EXIT_SUCCESS: u32 = 0x5555;
- \ No newline at end of file +EXIT_SUCCESS in os::board - Rust
const EXIT_SUCCESS: u32 = 0x5555;
\ No newline at end of file diff --git a/ch4/os/board/constant.MMIO.html b/ch4/os/board/constant.MMIO.html index 9f271051..72717cea 100644 --- a/ch4/os/board/constant.MMIO.html +++ b/ch4/os/board/constant.MMIO.html @@ -1,9 +1 @@ -MMIO in os::board - Rust -
-

Constant os::board::MMIO

source · []
pub const MMIO: &[(usize, usize)];
- \ No newline at end of file +MMIO in os::board - Rust

Constant os::board::MMIO

source · []
pub const MMIO: &'static [(usize, usize)];
\ No newline at end of file diff --git a/ch4/os/board/constant.QEMU_EXIT_HANDLE.html b/ch4/os/board/constant.QEMU_EXIT_HANDLE.html index d67dc643..f4f559fc 100644 --- a/ch4/os/board/constant.QEMU_EXIT_HANDLE.html +++ b/ch4/os/board/constant.QEMU_EXIT_HANDLE.html @@ -1,9 +1 @@ -QEMU_EXIT_HANDLE in os::board - Rust -
pub const QEMU_EXIT_HANDLE: RISCV64;
- \ No newline at end of file +QEMU_EXIT_HANDLE in os::board - Rust
pub const QEMU_EXIT_HANDLE: RISCV64;
\ No newline at end of file diff --git a/ch4/os/board/constant.VIRT_TEST.html b/ch4/os/board/constant.VIRT_TEST.html index 273d9061..5247f2a6 100644 --- a/ch4/os/board/constant.VIRT_TEST.html +++ b/ch4/os/board/constant.VIRT_TEST.html @@ -1,9 +1 @@ -VIRT_TEST in os::board - Rust -
-

Constant os::board::VIRT_TEST

source · []
const VIRT_TEST: u64 = 0x100000;
- \ No newline at end of file +VIRT_TEST in os::board - Rust
const VIRT_TEST: u64 = 0x100000;
\ No newline at end of file diff --git a/ch4/os/board/fn.exit_code_encode.html b/ch4/os/board/fn.exit_code_encode.html index c48aece1..02cbd01b 100644 --- a/ch4/os/board/fn.exit_code_encode.html +++ b/ch4/os/board/fn.exit_code_encode.html @@ -1,10 +1,2 @@ -exit_code_encode in os::board - Rust -
const fn exit_code_encode(code: u32) -> u32
Expand description

Encode the exit code using EXIT_FAILURE_FLAG.

-
- \ No newline at end of file +exit_code_encode in os::board - Rust
const fn exit_code_encode(code: u32) -> u32
Expand description

Encode the exit code using EXIT_FAILURE_FLAG.

+
\ No newline at end of file diff --git a/ch4/os/board/index.html b/ch4/os/board/index.html index 91e99f29..e324f6ef 100644 --- a/ch4/os/board/index.html +++ b/ch4/os/board/index.html @@ -1,16 +1,4 @@ -os::board - Rust -
-

Module os::board

source · []
Expand description

Constants used in rCore for qemu

-

Structs

-

RISCV64 configuration

-

Constants

-

Traits

-

Functions

-

Encode the exit code using EXIT_FAILURE_FLAG.

-
- \ No newline at end of file +os::board - Rust

Module os::board

source · []
Expand description

Constants used in rCore for qemu

+

Structs

RISCV64 configuration

+

Constants

Traits

Functions

Encode the exit code using EXIT_FAILURE_FLAG.

+
\ No newline at end of file diff --git a/ch4/os/board/struct.RISCV64.html b/ch4/os/board/struct.RISCV64.html index 8cae6673..118fd244 100644 --- a/ch4/os/board/struct.RISCV64.html +++ b/ch4/os/board/struct.RISCV64.html @@ -1,11 +1,4 @@ -RISCV64 in os::board - Rust -
-

Struct os::board::RISCV64

source · []
pub struct RISCV64 {
+RISCV64 in os::board - Rust
pub struct RISCV64 {
     addr: u64,
 }
Expand description

RISCV64 configuration

Fields

addr: u64

Address of the sifive_test mapped device.

@@ -20,9 +13,8 @@

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/board/trait.QEMUExit.html b/ch4/os/board/trait.QEMUExit.html index aa8e19aa..0a2361b1 100644 --- a/ch4/os/board/trait.QEMUExit.html +++ b/ch4/os/board/trait.QEMUExit.html @@ -1,11 +1,4 @@ -QEMUExit in os::board - Rust -
pub trait QEMUExit {
+QEMUExit in os::board - Rust
pub trait QEMUExit {
     fn exit(&self, code: u32) -> !;
     fn exit_success(&self) -> !;
     fn exit_failure(&self) -> !;
@@ -14,5 +7,4 @@
 

Exit QEMU using EXIT_SUCCESS, aka 0, if possible.

Note: Not possible for X86.

Exit QEMU using EXIT_FAILURE, aka 1.

-

Implementors

- \ No newline at end of file +

Implementors

\ No newline at end of file diff --git a/ch4/os/config/constant.KERNEL_HEAP_SIZE.html b/ch4/os/config/constant.KERNEL_HEAP_SIZE.html index 840035ac..ab4580ca 100644 --- a/ch4/os/config/constant.KERNEL_HEAP_SIZE.html +++ b/ch4/os/config/constant.KERNEL_HEAP_SIZE.html @@ -1,9 +1 @@ -KERNEL_HEAP_SIZE in os::config - Rust -
pub const KERNEL_HEAP_SIZE: usize = 0x30_0000;
- \ No newline at end of file +KERNEL_HEAP_SIZE in os::config - Rust
pub const KERNEL_HEAP_SIZE: usize = 0x30_0000;
\ No newline at end of file diff --git a/ch4/os/config/constant.KERNEL_STACK_SIZE.html b/ch4/os/config/constant.KERNEL_STACK_SIZE.html index 908a0a46..1b904b59 100644 --- a/ch4/os/config/constant.KERNEL_STACK_SIZE.html +++ b/ch4/os/config/constant.KERNEL_STACK_SIZE.html @@ -1,9 +1 @@ -KERNEL_STACK_SIZE in os::config - Rust -
pub const KERNEL_STACK_SIZE: usize = _; // 8_192usize
- \ No newline at end of file +KERNEL_STACK_SIZE in os::config - Rust
pub const KERNEL_STACK_SIZE: usize = _; // 8_192usize
\ No newline at end of file diff --git a/ch4/os/config/constant.MEMORY_END.html b/ch4/os/config/constant.MEMORY_END.html index 3c146175..cf06365d 100644 --- a/ch4/os/config/constant.MEMORY_END.html +++ b/ch4/os/config/constant.MEMORY_END.html @@ -1,9 +1 @@ -MEMORY_END in os::config - Rust -
-

Constant os::config::MEMORY_END

source · []
pub const MEMORY_END: usize = 0x80800000;
- \ No newline at end of file +MEMORY_END in os::config - Rust
pub const MEMORY_END: usize = 0x80800000;
\ No newline at end of file diff --git a/ch4/os/config/constant.PAGE_SIZE.html b/ch4/os/config/constant.PAGE_SIZE.html index 5a344d16..2cde57e7 100644 --- a/ch4/os/config/constant.PAGE_SIZE.html +++ b/ch4/os/config/constant.PAGE_SIZE.html @@ -1,9 +1 @@ -PAGE_SIZE in os::config - Rust -
-

Constant os::config::PAGE_SIZE

source · []
pub const PAGE_SIZE: usize = 0x1000;
- \ No newline at end of file +PAGE_SIZE in os::config - Rust
pub const PAGE_SIZE: usize = 0x1000;
\ No newline at end of file diff --git a/ch4/os/config/constant.PAGE_SIZE_BITS.html b/ch4/os/config/constant.PAGE_SIZE_BITS.html index ab1593ab..344521b7 100644 --- a/ch4/os/config/constant.PAGE_SIZE_BITS.html +++ b/ch4/os/config/constant.PAGE_SIZE_BITS.html @@ -1,9 +1 @@ -PAGE_SIZE_BITS in os::config - Rust -
pub const PAGE_SIZE_BITS: usize = 0xc;
- \ No newline at end of file +PAGE_SIZE_BITS in os::config - Rust
pub const PAGE_SIZE_BITS: usize = 0xc;
\ No newline at end of file diff --git a/ch4/os/config/constant.TRAMPOLINE.html b/ch4/os/config/constant.TRAMPOLINE.html index 9643ef46..e8ad9b28 100644 --- a/ch4/os/config/constant.TRAMPOLINE.html +++ b/ch4/os/config/constant.TRAMPOLINE.html @@ -1,9 +1 @@ -TRAMPOLINE in os::config - Rust -
-

Constant os::config::TRAMPOLINE

source · []
pub const TRAMPOLINE: usize = _; // 18_446_744_073_709_547_520usize
- \ No newline at end of file +TRAMPOLINE in os::config - Rust
pub const TRAMPOLINE: usize = _; // 18_446_744_073_709_547_520usize
\ No newline at end of file diff --git a/ch4/os/config/constant.TRAP_CONTEXT.html b/ch4/os/config/constant.TRAP_CONTEXT.html index ff5dd843..e84ea12d 100644 --- a/ch4/os/config/constant.TRAP_CONTEXT.html +++ b/ch4/os/config/constant.TRAP_CONTEXT.html @@ -1,9 +1 @@ -TRAP_CONTEXT in os::config - Rust -
pub const TRAP_CONTEXT: usize = _; // 18_446_744_073_709_543_424usize
- \ No newline at end of file +TRAP_CONTEXT in os::config - Rust
pub const TRAP_CONTEXT: usize = _; // 18_446_744_073_709_543_424usize
\ No newline at end of file diff --git a/ch4/os/config/constant.USER_STACK_SIZE.html b/ch4/os/config/constant.USER_STACK_SIZE.html index c359572c..cc3a1f09 100644 --- a/ch4/os/config/constant.USER_STACK_SIZE.html +++ b/ch4/os/config/constant.USER_STACK_SIZE.html @@ -1,9 +1 @@ -USER_STACK_SIZE in os::config - Rust -
pub const USER_STACK_SIZE: usize = _; // 8_192usize
- \ No newline at end of file +USER_STACK_SIZE in os::config - Rust
pub const USER_STACK_SIZE: usize = _; // 8_192usize
\ No newline at end of file diff --git a/ch4/os/config/fn.kernel_stack_position.html b/ch4/os/config/fn.kernel_stack_position.html index 95e9012c..e7731cea 100644 --- a/ch4/os/config/fn.kernel_stack_position.html +++ b/ch4/os/config/fn.kernel_stack_position.html @@ -1,10 +1,2 @@ -kernel_stack_position in os::config - Rust -
pub fn kernel_stack_position(app_id: usize) -> (usize, usize)
Expand description

Return (bottom, top) of a kernel stack in kernel space.

-
- \ No newline at end of file +kernel_stack_position in os::config - Rust
pub fn kernel_stack_position(app_id: usize) -> (usize, usize)
Expand description

Return (bottom, top) of a kernel stack in kernel space.

+
\ No newline at end of file diff --git a/ch4/os/config/index.html b/ch4/os/config/index.html index 1218c55e..189f03b7 100644 --- a/ch4/os/config/index.html +++ b/ch4/os/config/index.html @@ -1,14 +1,3 @@ -os::config - Rust -
-

Module os::config

source · []
Expand description

Constants used in rCore

-

Re-exports

-
pub use crate::board::CLOCK_FREQ;
pub use crate::board::MMIO;

Constants

-

Functions

-

Return (bottom, top) of a kernel stack in kernel space.

-
- \ No newline at end of file +os::config - Rust

Module os::config

source · []
Expand description

Constants used in rCore

+

Re-exports

pub use crate::board::CLOCK_FREQ;
pub use crate::board::MMIO;

Constants

Functions

Return (bottom, top) of a kernel stack in kernel space.

+
\ No newline at end of file diff --git a/ch4/os/console/fn.print.html b/ch4/os/console/fn.print.html index 246a011f..b2afaec7 100644 --- a/ch4/os/console/fn.print.html +++ b/ch4/os/console/fn.print.html @@ -1,9 +1 @@ -print in os::console - Rust -
-

Function os::console::print

source · []
pub fn print(args: Arguments<'_>)
- \ No newline at end of file +print in os::console - Rust

Function os::console::print

source · []
pub fn print(args: Arguments<'_>)
\ No newline at end of file diff --git a/ch4/os/console/index.html b/ch4/os/console/index.html index 5be27dcb..3b8358a5 100644 --- a/ch4/os/console/index.html +++ b/ch4/os/console/index.html @@ -1,12 +1,2 @@ -os::console - Rust -
-

Module os::console

source · []
Expand description

SBI console driver, for text output

-

Structs

-
Stdout 🔒

Functions

-
- \ No newline at end of file +os::console - Rust
Expand description

SBI console driver, for text output

+

Structs

Stdout 🔒

Functions

\ No newline at end of file diff --git a/ch4/os/console/struct.Stdout.html b/ch4/os/console/struct.Stdout.html index 95e2dc58..a6d180bc 100644 --- a/ch4/os/console/struct.Stdout.html +++ b/ch4/os/console/struct.Stdout.html @@ -1,11 +1,4 @@ -Stdout in os::console - Rust -
-

Struct os::console::Stdout

source · []
struct Stdout;

Trait Implementations

Writes a string slice into this writer, returning whether the write +Stdout in os::console - Rust

struct Stdout;

Trait Implementations

Writes a string slice into this writer, returning whether the write succeeded. Read more

Writes a char into this writer, returning whether the write succeeded. Read more

Glue for usage of the write! macro with implementors of this trait. Read more

@@ -16,9 +9,8 @@ succeeded.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/fn.clear_bss.html b/ch4/os/fn.clear_bss.html index 1f5a6c40..c9f37f89 100644 --- a/ch4/os/fn.clear_bss.html +++ b/ch4/os/fn.clear_bss.html @@ -1,10 +1,2 @@ -clear_bss in os - Rust -
-

Function os::clear_bss

source · []
pub(crate) fn clear_bss()
Expand description

clear BSS segment

-
- \ No newline at end of file +clear_bss in os - Rust

Function os::clear_bss

source · []
pub(crate) fn clear_bss()
Expand description

clear BSS segment

+
\ No newline at end of file diff --git a/ch4/os/fn.rust_main.html b/ch4/os/fn.rust_main.html index 626132db..88d2384c 100644 --- a/ch4/os/fn.rust_main.html +++ b/ch4/os/fn.rust_main.html @@ -1,11 +1,3 @@ -rust_main in os - Rust -
-

Function os::rust_main

source · []
#[no_mangle]
+rust_main in os - Rust

Function os::rust_main

source · []
#[no_mangle]
 pub fn rust_main() -> !
Expand description

the rust entry-point of os

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/index.html b/ch4/os/index.html index f2289170..9d0727f2 100644 --- a/ch4/os/index.html +++ b/ch4/os/index.html @@ -1,11 +1,4 @@ -os - Rust -
-

Crate os

source · []
Expand description

The main module and entrypoint

+os - Rust

Crate os

source · []
Expand description

The main module and entrypoint

Various facilities of the kernels are implemented as submodules. The most important ones are:

    @@ -19,8 +12,7 @@ initialize various pieces of functionality. (See its source code for details.)

    We then call task::run_first_task() and for the first time go to userspace.

    -

Modules

-
board 🔒

Constants used in rCore for qemu

+

Modules

board 🔒

Constants used in rCore for qemu

config 🔒

Constants used in rCore

console 🔒

SBI console driver, for text output

lang_items 🔒

The panic handler

@@ -32,11 +24,8 @@ userspace.

Task management implementation

timer 🔒

RISC-V timer-related functionality

Trap handling functionality

-

Macros

-

print string macro

+

Macros

print string macro

println string macro

-

Functions

-
clear_bss 🔒

clear BSS segment

+

Functions

clear_bss 🔒

clear BSS segment

the rust entry-point of os

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/lang_items/fn.panic.html b/ch4/os/lang_items/fn.panic.html index 152f40ea..41caf6f1 100644 --- a/ch4/os/lang_items/fn.panic.html +++ b/ch4/os/lang_items/fn.panic.html @@ -1,10 +1,2 @@ -panic in os::lang_items - Rust -
-

Function os::lang_items::panic

source · []
fn panic(info: &PanicInfo<'_>) -> !
Expand description

panic handler

-
- \ No newline at end of file +panic in os::lang_items - Rust
fn panic(info: &PanicInfo<'_>) -> !
Expand description

panic handler

+
\ No newline at end of file diff --git a/ch4/os/lang_items/index.html b/ch4/os/lang_items/index.html index 06a99c0b..b4c12520 100644 --- a/ch4/os/lang_items/index.html +++ b/ch4/os/lang_items/index.html @@ -1,12 +1,3 @@ -os::lang_items - Rust -
-

Module os::lang_items

source · []
Expand description

The panic handler

-

Functions

-
panic 🔒

panic handler

-
- \ No newline at end of file +os::lang_items - Rust
Expand description

The panic handler

+

Functions

panic 🔒

panic handler

+
\ No newline at end of file diff --git a/ch4/os/loader/fn.get_app_data.html b/ch4/os/loader/fn.get_app_data.html index 0de4cbd7..8e97ea3a 100644 --- a/ch4/os/loader/fn.get_app_data.html +++ b/ch4/os/loader/fn.get_app_data.html @@ -1,10 +1,2 @@ -get_app_data in os::loader - Rust -
pub fn get_app_data(app_id: usize) -> &'static [u8]
Expand description

get applications data

-
- \ No newline at end of file +get_app_data in os::loader - Rust
pub fn get_app_data(app_id: usize) -> &'static [u8]
Expand description

get applications data

+
\ No newline at end of file diff --git a/ch4/os/loader/fn.get_num_app.html b/ch4/os/loader/fn.get_num_app.html index 42738b11..7dbcb96b 100644 --- a/ch4/os/loader/fn.get_num_app.html +++ b/ch4/os/loader/fn.get_num_app.html @@ -1,10 +1,2 @@ -get_num_app in os::loader - Rust -
-

Function os::loader::get_num_app

source · []
pub fn get_num_app() -> usize
Expand description

Get the total number of applications.

-
- \ No newline at end of file +get_num_app in os::loader - Rust
pub fn get_num_app() -> usize
Expand description

Get the total number of applications.

+
\ No newline at end of file diff --git a/ch4/os/loader/index.html b/ch4/os/loader/index.html index 72c97e04..dabf3ff4 100644 --- a/ch4/os/loader/index.html +++ b/ch4/os/loader/index.html @@ -1,13 +1,4 @@ -os::loader - Rust -
-

Module os::loader

source · []
Expand description

Loading user applications into memory

-

Functions

-

get applications data

+os::loader - Rust

Module os::loader

source · []
Expand description

Loading user applications into memory

+

Functions

get applications data

Get the total number of applications.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/macro.print.html b/ch4/os/macro.print.html index f67bc247..512a6bb4 100644 --- a/ch4/os/macro.print.html +++ b/ch4/os/macro.print.html @@ -1,13 +1,5 @@ -print in os - Rust -
-

Macro os::print

source · []
macro_rules! print {
+print in os - Rust

Macro os::print

source · []
macro_rules! print {
     ($fmt: literal $(, $($arg: tt)+)?) => { ... };
 }
Expand description

print string macro

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/macro.println.html b/ch4/os/macro.println.html index 1e143ed8..c8fcf42d 100644 --- a/ch4/os/macro.println.html +++ b/ch4/os/macro.println.html @@ -1,13 +1,5 @@ -println in os - Rust -
-

Macro os::println

source · []
macro_rules! println {
+println in os - Rust
macro_rules! println {
     ($fmt: literal $(, $($arg: tt)+)?) => { ... };
 }
Expand description

println string macro

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/mm/address/constant.PA_WIDTH_SV39.html b/ch4/os/mm/address/constant.PA_WIDTH_SV39.html index 75944064..ab640dec 100644 --- a/ch4/os/mm/address/constant.PA_WIDTH_SV39.html +++ b/ch4/os/mm/address/constant.PA_WIDTH_SV39.html @@ -1,10 +1,2 @@ -PA_WIDTH_SV39 in os::mm::address - Rust -
const PA_WIDTH_SV39: usize = 56;
Expand description

physical address

-
- \ No newline at end of file +PA_WIDTH_SV39 in os::mm::address - Rust
const PA_WIDTH_SV39: usize = 56;
Expand description

physical address

+
\ No newline at end of file diff --git a/ch4/os/mm/address/constant.PPN_WIDTH_SV39.html b/ch4/os/mm/address/constant.PPN_WIDTH_SV39.html index c5aeabcb..dedfa693 100644 --- a/ch4/os/mm/address/constant.PPN_WIDTH_SV39.html +++ b/ch4/os/mm/address/constant.PPN_WIDTH_SV39.html @@ -1,9 +1 @@ -PPN_WIDTH_SV39 in os::mm::address - Rust -
const PPN_WIDTH_SV39: usize = _; // 44usize
- \ No newline at end of file +PPN_WIDTH_SV39 in os::mm::address - Rust
const PPN_WIDTH_SV39: usize = _; // 44usize
\ No newline at end of file diff --git a/ch4/os/mm/address/constant.VA_WIDTH_SV39.html b/ch4/os/mm/address/constant.VA_WIDTH_SV39.html index b5a9818e..d5620874 100644 --- a/ch4/os/mm/address/constant.VA_WIDTH_SV39.html +++ b/ch4/os/mm/address/constant.VA_WIDTH_SV39.html @@ -1,9 +1 @@ -VA_WIDTH_SV39 in os::mm::address - Rust -
const VA_WIDTH_SV39: usize = 39;
- \ No newline at end of file +VA_WIDTH_SV39 in os::mm::address - Rust
const VA_WIDTH_SV39: usize = 39;
\ No newline at end of file diff --git a/ch4/os/mm/address/constant.VPN_WIDTH_SV39.html b/ch4/os/mm/address/constant.VPN_WIDTH_SV39.html index 4f239e4f..bedfa890 100644 --- a/ch4/os/mm/address/constant.VPN_WIDTH_SV39.html +++ b/ch4/os/mm/address/constant.VPN_WIDTH_SV39.html @@ -1,9 +1 @@ -VPN_WIDTH_SV39 in os::mm::address - Rust -
const VPN_WIDTH_SV39: usize = _; // 27usize
- \ No newline at end of file +VPN_WIDTH_SV39 in os::mm::address - Rust
const VPN_WIDTH_SV39: usize = _; // 27usize
\ No newline at end of file diff --git a/ch4/os/mm/address/index.html b/ch4/os/mm/address/index.html index a635e36e..365ebda7 100644 --- a/ch4/os/mm/address/index.html +++ b/ch4/os/mm/address/index.html @@ -1,22 +1,10 @@ -os::mm::address - Rust -
-

Module os::mm::address

source · []
Expand description

Implementation of physical and virtual address and page number.

-

Structs

-

Definitions

+os::mm::address - Rust

Module os::mm::address

source · []
Expand description

Implementation of physical and virtual address and page number.

+

Structs

Definitions

physical page number

a simple range structure for type T

iterator for the simple range structure

virtual address

virtual page number

-

Constants

-

physical address

-

Traits

-

Type Definitions

-

a simple range structure for virtual page number

-
- \ No newline at end of file +

Constants

physical address

+

Traits

Type Definitions

a simple range structure for virtual page number

+
\ No newline at end of file diff --git a/ch4/os/mm/address/struct.PhysAddr.html b/ch4/os/mm/address/struct.PhysAddr.html index d417de88..005682ad 100644 --- a/ch4/os/mm/address/struct.PhysAddr.html +++ b/ch4/os/mm/address/struct.PhysAddr.html @@ -1,11 +1,4 @@ -PhysAddr in os::mm::address - Rust -
-

Struct os::mm::address::PhysAddr

source · []
pub struct PhysAddr(pub usize);
Expand description

Definitions

+PhysAddr in os::mm::address - Rust
pub struct PhysAddr(pub usize);
Expand description

Definitions

Tuple Fields

0: usize

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

@@ -17,18 +10,18 @@ T -> usize: T.0 usize -> T: usize.into()

Converts to this type from the input type.

This method returns an Ordering between self and other. Read more

-

Compares and returns the maximum of two values. Read more

-

Compares and returns the minimum of two values. Read more

-

Restrict a value to a certain interval. Read more

+

Compares and returns the maximum of two values. Read more

+

Compares and returns the minimum of two values. Read more

+

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

-

This method tests less than (for self and other) and is used by the < operator. Read more

-

This method tests less than or equal to (for self and other) and is used by the <= +

This method tests less than (for self and other) and is used by the < operator. Read more

+

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

-

This method tests greater than (for self and other) and is used by the > operator. Read more

-

This method tests greater than or equal to (for self and other) and is used by the >= +

This method tests greater than (for self and other) and is used by the > operator. Read more

+

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

@@ -40,9 +33,8 @@ operator.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/mm/address/struct.PhysPageNum.html b/ch4/os/mm/address/struct.PhysPageNum.html index 804dcb54..1aecf8c2 100644 --- a/ch4/os/mm/address/struct.PhysPageNum.html +++ b/ch4/os/mm/address/struct.PhysPageNum.html @@ -1,11 +1,4 @@ -PhysPageNum in os::mm::address - Rust -
pub struct PhysPageNum(pub usize);
Expand description

physical page number

+PhysPageNum in os::mm::address - Rust
pub struct PhysPageNum(pub usize);
Expand description

physical page number

Tuple Fields

0: usize

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

@@ -14,18 +7,18 @@

Converts to this type from the input type.

Converts to this type from the input type.

This method returns an Ordering between self and other. Read more

-

Compares and returns the maximum of two values. Read more

-

Compares and returns the minimum of two values. Read more

-

Restrict a value to a certain interval. Read more

+

Compares and returns the maximum of two values. Read more

+

Compares and returns the minimum of two values. Read more

+

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

-

This method tests less than (for self and other) and is used by the < operator. Read more

-

This method tests less than or equal to (for self and other) and is used by the <= +

This method tests less than (for self and other) and is used by the < operator. Read more

+

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

-

This method tests greater than (for self and other) and is used by the > operator. Read more

-

This method tests greater than or equal to (for self and other) and is used by the >= +

This method tests greater than (for self and other) and is used by the > operator. Read more

+

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

@@ -37,9 +30,8 @@ operator.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/mm/address/struct.SimpleRange.html b/ch4/os/mm/address/struct.SimpleRange.html index b1dad7f6..95d99d6f 100644 --- a/ch4/os/mm/address/struct.SimpleRange.html +++ b/ch4/os/mm/address/struct.SimpleRange.html @@ -1,11 +1,4 @@ -SimpleRange in os::mm::address - Rust -
pub struct SimpleRange<T> where
    T: StepByOne + Copy + PartialEq + PartialOrd + Debug
{ +SimpleRange in os::mm::address - Rust
pub struct SimpleRange<T> where
    T: StepByOne + Copy + PartialEq + PartialOrd + Debug
{ l: T, r: T, }
Expand description

a simple range structure for type T

@@ -24,9 +17,8 @@

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/mm/address/struct.SimpleRangeIterator.html b/ch4/os/mm/address/struct.SimpleRangeIterator.html index d4c03875..48082e68 100644 --- a/ch4/os/mm/address/struct.SimpleRangeIterator.html +++ b/ch4/os/mm/address/struct.SimpleRangeIterator.html @@ -1,11 +1,4 @@ -SimpleRangeIterator in os::mm::address - Rust -
pub struct SimpleRangeIterator<T> where
    T: StepByOne + Copy + PartialEq + PartialOrd + Debug
{ +SimpleRangeIterator in os::mm::address - Rust
pub struct SimpleRangeIterator<T> where
    T: StepByOne + Copy + PartialEq + PartialOrd + Debug
{ current: T, end: T, }
Expand description

iterator for the simple range structure

@@ -132,9 +125,8 @@ function.

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/mm/address/struct.VirtAddr.html b/ch4/os/mm/address/struct.VirtAddr.html index 0734887b..82220c98 100644 --- a/ch4/os/mm/address/struct.VirtAddr.html +++ b/ch4/os/mm/address/struct.VirtAddr.html @@ -1,11 +1,4 @@ -VirtAddr in os::mm::address - Rust -
-

Struct os::mm::address::VirtAddr

source · []
pub struct VirtAddr(pub usize);
Expand description

virtual address

+VirtAddr in os::mm::address - Rust
pub struct VirtAddr(pub usize);
Expand description

virtual address

Tuple Fields

0: usize

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Debugging

@@ -15,18 +8,18 @@

Converts to this type from the input type.

Converts to this type from the input type.

This method returns an Ordering between self and other. Read more

-

Compares and returns the maximum of two values. Read more

-

Compares and returns the minimum of two values. Read more

-

Restrict a value to a certain interval. Read more

+

Compares and returns the maximum of two values. Read more

+

Compares and returns the minimum of two values. Read more

+

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

-

This method tests less than (for self and other) and is used by the < operator. Read more

-

This method tests less than or equal to (for self and other) and is used by the <= +

This method tests less than (for self and other) and is used by the < operator. Read more

+

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

-

This method tests greater than (for self and other) and is used by the > operator. Read more

-

This method tests greater than or equal to (for self and other) and is used by the >= +

This method tests greater than (for self and other) and is used by the > operator. Read more

+

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

@@ -38,9 +31,8 @@ operator.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/mm/address/struct.VirtPageNum.html b/ch4/os/mm/address/struct.VirtPageNum.html index 6615a883..5a7e5d4a 100644 --- a/ch4/os/mm/address/struct.VirtPageNum.html +++ b/ch4/os/mm/address/struct.VirtPageNum.html @@ -1,11 +1,4 @@ -VirtPageNum in os::mm::address - Rust -
pub struct VirtPageNum(pub usize);
Expand description

virtual page number

+VirtPageNum in os::mm::address - Rust
pub struct VirtPageNum(pub usize);
Expand description

virtual page number

Tuple Fields

0: usize

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

@@ -14,18 +7,18 @@

Converts to this type from the input type.

Converts to this type from the input type.

This method returns an Ordering between self and other. Read more

-

Compares and returns the maximum of two values. Read more

-

Compares and returns the minimum of two values. Read more

-

Restrict a value to a certain interval. Read more

+

Compares and returns the maximum of two values. Read more

+

Compares and returns the minimum of two values. Read more

+

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

-

This method tests less than (for self and other) and is used by the < operator. Read more

-

This method tests less than or equal to (for self and other) and is used by the <= +

This method tests less than (for self and other) and is used by the < operator. Read more

+

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

-

This method tests greater than (for self and other) and is used by the > operator. Read more

-

This method tests greater than or equal to (for self and other) and is used by the >= +

This method tests greater than (for self and other) and is used by the > operator. Read more

+

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

@@ -37,9 +30,8 @@ operator.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/mm/address/trait.StepByOne.html b/ch4/os/mm/address/trait.StepByOne.html index 6783944e..dca8d751 100644 --- a/ch4/os/mm/address/trait.StepByOne.html +++ b/ch4/os/mm/address/trait.StepByOne.html @@ -1,11 +1,3 @@ -StepByOne in os::mm::address - Rust -
pub trait StepByOne {
+StepByOne in os::mm::address - Rust
pub trait StepByOne {
     fn step(&mut self);
-}

Required Methods

Implementors

- \ No newline at end of file +}

Required Methods

Implementors

\ No newline at end of file diff --git a/ch4/os/mm/address/type.VPNRange.html b/ch4/os/mm/address/type.VPNRange.html index 919ca0da..257a95b3 100644 --- a/ch4/os/mm/address/type.VPNRange.html +++ b/ch4/os/mm/address/type.VPNRange.html @@ -1,10 +1,2 @@ -VPNRange in os::mm::address - Rust -
-

Type Definition os::mm::address::VPNRange

source · []
pub type VPNRange = SimpleRange<VirtPageNum>;
Expand description

a simple range structure for virtual page number

-
- \ No newline at end of file +VPNRange in os::mm::address - Rust

Type Definition os::mm::address::VPNRange

source · []
pub type VPNRange = SimpleRange<VirtPageNum>;
Expand description

a simple range structure for virtual page number

+
\ No newline at end of file diff --git a/ch4/os/mm/fn.init.html b/ch4/os/mm/fn.init.html index e32e93e9..13915e3c 100644 --- a/ch4/os/mm/fn.init.html +++ b/ch4/os/mm/fn.init.html @@ -1,10 +1,2 @@ -init in os::mm - Rust -
-

Function os::mm::init

source · []
pub fn init()
Expand description

initiate heap allocator, frame allocator and kernel space

-
- \ No newline at end of file +init in os::mm - Rust

Function os::mm::init

source · []
pub fn init()
Expand description

initiate heap allocator, frame allocator and kernel space

+
\ No newline at end of file diff --git a/ch4/os/mm/frame_allocator/fn.frame_alloc.html b/ch4/os/mm/frame_allocator/fn.frame_alloc.html index ba5bd56b..7b4e6454 100644 --- a/ch4/os/mm/frame_allocator/fn.frame_alloc.html +++ b/ch4/os/mm/frame_allocator/fn.frame_alloc.html @@ -1,10 +1,2 @@ -frame_alloc in os::mm::frame_allocator - Rust -
pub fn frame_alloc() -> Option<FrameTracker>
Expand description

allocate a frame

-
- \ No newline at end of file +frame_alloc in os::mm::frame_allocator - Rust
pub fn frame_alloc() -> Option<FrameTracker>
Expand description

allocate a frame

+
\ No newline at end of file diff --git a/ch4/os/mm/frame_allocator/fn.frame_allocator_test.html b/ch4/os/mm/frame_allocator/fn.frame_allocator_test.html index 05028602..acf2e1cc 100644 --- a/ch4/os/mm/frame_allocator/fn.frame_allocator_test.html +++ b/ch4/os/mm/frame_allocator/fn.frame_allocator_test.html @@ -1,10 +1,2 @@ -frame_allocator_test in os::mm::frame_allocator - Rust -
pub fn frame_allocator_test()
Expand description

a simple test for frame allocator

-
- \ No newline at end of file +frame_allocator_test in os::mm::frame_allocator - Rust
pub fn frame_allocator_test()
Expand description

a simple test for frame allocator

+
\ No newline at end of file diff --git a/ch4/os/mm/frame_allocator/fn.frame_dealloc.html b/ch4/os/mm/frame_allocator/fn.frame_dealloc.html index 3a1a7d9e..a685882c 100644 --- a/ch4/os/mm/frame_allocator/fn.frame_dealloc.html +++ b/ch4/os/mm/frame_allocator/fn.frame_dealloc.html @@ -1,10 +1,2 @@ -frame_dealloc in os::mm::frame_allocator - Rust -
fn frame_dealloc(ppn: PhysPageNum)
Expand description

deallocate a frame

-
- \ No newline at end of file +frame_dealloc in os::mm::frame_allocator - Rust
fn frame_dealloc(ppn: PhysPageNum)
Expand description

deallocate a frame

+
\ No newline at end of file diff --git a/ch4/os/mm/frame_allocator/fn.init_frame_allocator.html b/ch4/os/mm/frame_allocator/fn.init_frame_allocator.html index fbab74a3..948aa858 100644 --- a/ch4/os/mm/frame_allocator/fn.init_frame_allocator.html +++ b/ch4/os/mm/frame_allocator/fn.init_frame_allocator.html @@ -1,10 +1,2 @@ -init_frame_allocator in os::mm::frame_allocator - Rust -
pub fn init_frame_allocator()
Expand description

initiate the frame allocator using ekernel and MEMORY_END

-
- \ No newline at end of file +init_frame_allocator in os::mm::frame_allocator - Rust
pub fn init_frame_allocator()
Expand description

initiate the frame allocator using ekernel and MEMORY_END

+
\ No newline at end of file diff --git a/ch4/os/mm/frame_allocator/index.html b/ch4/os/mm/frame_allocator/index.html index 1a8229b4..1a4e4df3 100644 --- a/ch4/os/mm/frame_allocator/index.html +++ b/ch4/os/mm/frame_allocator/index.html @@ -1,22 +1,10 @@ -os::mm::frame_allocator - Rust -
Expand description

Implementation of FrameAllocator which +os::mm::frame_allocator - Rust

Expand description

Implementation of FrameAllocator which controls all the frames in the operating system.

-

Structs

-

frame allocator instance through lazy_static!

+

Structs

frame allocator instance through lazy_static!

manage a frame which has the same lifecycle as the tracker

an implementation for frame allocator

-

Traits

-

Functions

-

allocate a frame

+

Traits

Functions

allocate a frame

a simple test for frame allocator

deallocate a frame

initiate the frame allocator using ekernel and MEMORY_END

-

Type Definitions

-
- \ No newline at end of file +

Type Definitions

\ No newline at end of file diff --git a/ch4/os/mm/frame_allocator/struct.FRAME_ALLOCATOR.html b/ch4/os/mm/frame_allocator/struct.FRAME_ALLOCATOR.html index d56c8667..74e1b986 100644 --- a/ch4/os/mm/frame_allocator/struct.FRAME_ALLOCATOR.html +++ b/ch4/os/mm/frame_allocator/struct.FRAME_ALLOCATOR.html @@ -1,11 +1,4 @@ -FRAME_ALLOCATOR in os::mm::frame_allocator - Rust -
pub struct FRAME_ALLOCATOR {
+FRAME_ALLOCATOR in os::mm::frame_allocator - Rust
pub struct FRAME_ALLOCATOR {
     __private_field: (),
 }
Expand description

frame allocator instance through lazy_static!

Fields

__private_field: ()

Methods from Deref<Target = UPSafeCell<StackFrameAllocator>>

Exclusive access inner data in UPSafeCell. Panic if the data has been borrowed.

@@ -18,9 +11,8 @@

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/mm/frame_allocator/struct.FrameTracker.html b/ch4/os/mm/frame_allocator/struct.FrameTracker.html index 66d7ac0a..c1891594 100644 --- a/ch4/os/mm/frame_allocator/struct.FrameTracker.html +++ b/ch4/os/mm/frame_allocator/struct.FrameTracker.html @@ -1,11 +1,4 @@ -FrameTracker in os::mm::frame_allocator - Rust -
pub struct FrameTracker {
+FrameTracker in os::mm::frame_allocator - Rust
pub struct FrameTracker {
     pub ppn: PhysPageNum,
 }
Expand description

manage a frame which has the same lifecycle as the tracker

Fields

ppn: PhysPageNum

Implementations

Trait Implementations

Formats the value using the given formatter. Read more

@@ -17,9 +10,8 @@

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/mm/frame_allocator/struct.StackFrameAllocator.html b/ch4/os/mm/frame_allocator/struct.StackFrameAllocator.html index 1263db63..eb12d1b4 100644 --- a/ch4/os/mm/frame_allocator/struct.StackFrameAllocator.html +++ b/ch4/os/mm/frame_allocator/struct.StackFrameAllocator.html @@ -1,11 +1,4 @@ -StackFrameAllocator in os::mm::frame_allocator - Rust -
pub struct StackFrameAllocator {
+StackFrameAllocator in os::mm::frame_allocator - Rust
pub struct StackFrameAllocator {
     current: usize,
     end: usize,
     recycled: Vec<usize>,
@@ -17,9 +10,8 @@
 

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/mm/frame_allocator/trait.FrameAllocator.html b/ch4/os/mm/frame_allocator/trait.FrameAllocator.html index 335c604f..4eff9015 100644 --- a/ch4/os/mm/frame_allocator/trait.FrameAllocator.html +++ b/ch4/os/mm/frame_allocator/trait.FrameAllocator.html @@ -1,13 +1,5 @@ -FrameAllocator in os::mm::frame_allocator - Rust -
trait FrameAllocator {
+FrameAllocator in os::mm::frame_allocator - Rust
trait FrameAllocator {
     fn new() -> Self;
     fn alloc(&mut self) -> Option<PhysPageNum>;
     fn dealloc(&mut self, ppn: PhysPageNum);
-}

Required Methods

Implementors

- \ No newline at end of file +}

Required Methods

Implementors

\ No newline at end of file diff --git a/ch4/os/mm/frame_allocator/type.FrameAllocatorImpl.html b/ch4/os/mm/frame_allocator/type.FrameAllocatorImpl.html index 0ce84936..dc449550 100644 --- a/ch4/os/mm/frame_allocator/type.FrameAllocatorImpl.html +++ b/ch4/os/mm/frame_allocator/type.FrameAllocatorImpl.html @@ -1,9 +1 @@ -FrameAllocatorImpl in os::mm::frame_allocator - Rust -
type FrameAllocatorImpl = StackFrameAllocator;
- \ No newline at end of file +FrameAllocatorImpl in os::mm::frame_allocator - Rust
type FrameAllocatorImpl = StackFrameAllocator;
\ No newline at end of file diff --git a/ch4/os/mm/heap_allocator/fn.handle_alloc_error.html b/ch4/os/mm/heap_allocator/fn.handle_alloc_error.html index 784e9e03..652b0844 100644 --- a/ch4/os/mm/heap_allocator/fn.handle_alloc_error.html +++ b/ch4/os/mm/heap_allocator/fn.handle_alloc_error.html @@ -1,10 +1,2 @@ -handle_alloc_error in os::mm::heap_allocator - Rust -
pub fn handle_alloc_error(layout: Layout) -> !
Expand description

panic when heap allocation error occurs

-
- \ No newline at end of file +handle_alloc_error in os::mm::heap_allocator - Rust
pub fn handle_alloc_error(layout: Layout) -> !
Expand description

panic when heap allocation error occurs

+
\ No newline at end of file diff --git a/ch4/os/mm/heap_allocator/fn.heap_test.html b/ch4/os/mm/heap_allocator/fn.heap_test.html index fd79baf9..3a34ca8e 100644 --- a/ch4/os/mm/heap_allocator/fn.heap_test.html +++ b/ch4/os/mm/heap_allocator/fn.heap_test.html @@ -1,9 +1 @@ -heap_test in os::mm::heap_allocator - Rust -
pub fn heap_test()
- \ No newline at end of file +heap_test in os::mm::heap_allocator - Rust
pub fn heap_test()
\ No newline at end of file diff --git a/ch4/os/mm/heap_allocator/fn.init_heap.html b/ch4/os/mm/heap_allocator/fn.init_heap.html index 3e14c449..b0c2a4f5 100644 --- a/ch4/os/mm/heap_allocator/fn.init_heap.html +++ b/ch4/os/mm/heap_allocator/fn.init_heap.html @@ -1,10 +1,2 @@ -init_heap in os::mm::heap_allocator - Rust -
pub fn init_heap()
Expand description

initiate heap allocator

-
- \ No newline at end of file +init_heap in os::mm::heap_allocator - Rust
pub fn init_heap()
Expand description

initiate heap allocator

+
\ No newline at end of file diff --git a/ch4/os/mm/heap_allocator/index.html b/ch4/os/mm/heap_allocator/index.html index 76662e76..d26f36ad 100644 --- a/ch4/os/mm/heap_allocator/index.html +++ b/ch4/os/mm/heap_allocator/index.html @@ -1,16 +1,6 @@ -os::mm::heap_allocator - Rust -
Expand description

The global allocator

-

Statics

-

heap allocator instance

+os::mm::heap_allocator - Rust
Expand description

The global allocator

+

Statics

heap allocator instance

HEAP_SPACE 🔒

heap space ([u8; KERNEL_HEAP_SIZE])

-

Functions

-

panic when heap allocation error occurs

+

Functions

panic when heap allocation error occurs

initiate heap allocator

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/mm/heap_allocator/static.HEAP_ALLOCATOR.html b/ch4/os/mm/heap_allocator/static.HEAP_ALLOCATOR.html index 42f9f4a9..86a79146 100644 --- a/ch4/os/mm/heap_allocator/static.HEAP_ALLOCATOR.html +++ b/ch4/os/mm/heap_allocator/static.HEAP_ALLOCATOR.html @@ -1,10 +1,2 @@ -HEAP_ALLOCATOR in os::mm::heap_allocator - Rust -
static HEAP_ALLOCATOR: LockedHeap
Expand description

heap allocator instance

-
- \ No newline at end of file +HEAP_ALLOCATOR in os::mm::heap_allocator - Rust
static HEAP_ALLOCATOR: LockedHeap
Expand description

heap allocator instance

+
\ No newline at end of file diff --git a/ch4/os/mm/heap_allocator/static.HEAP_SPACE.html b/ch4/os/mm/heap_allocator/static.HEAP_SPACE.html index f701cf1a..5fa24fb9 100644 --- a/ch4/os/mm/heap_allocator/static.HEAP_SPACE.html +++ b/ch4/os/mm/heap_allocator/static.HEAP_SPACE.html @@ -1,10 +1,2 @@ -HEAP_SPACE in os::mm::heap_allocator - Rust -
static mut HEAP_SPACE: [u8; 3145728]
Expand description

heap space ([u8; KERNEL_HEAP_SIZE])

-
- \ No newline at end of file +HEAP_SPACE in os::mm::heap_allocator - Rust
static mut HEAP_SPACE: [u8; 3145728]
Expand description

heap space ([u8; KERNEL_HEAP_SIZE])

+
\ No newline at end of file diff --git a/ch4/os/mm/index.html b/ch4/os/mm/index.html index 38966335..d992c02d 100644 --- a/ch4/os/mm/index.html +++ b/ch4/os/mm/index.html @@ -1,24 +1,13 @@ -os::mm - Rust -
-

Module os::mm

source · []
Expand description

Memory management implementation

+os::mm - Rust

Module os::mm

source · []
Expand description

Memory management implementation

SV39 page-based virtual-memory architecture for RV64 systems, and everything about memory management, like frame allocator, page table, map area and memory set, is implemented here.

Every task or process has a memory_set to control its virtual memory.

-

Re-exports

-
pub use address::PhysAddr;
pub use address::PhysPageNum;
pub use address::VirtAddr;
pub use address::VirtPageNum;
pub use frame_allocator::frame_alloc;
pub use frame_allocator::FrameTracker;
pub use memory_set::remap_test;
pub use memory_set::MapPermission;
pub use memory_set::MemorySet;
pub use memory_set::KERNEL_SPACE;
pub use memory_set::KERNEL_SPACE;
pub use page_table::translated_byte_buffer;
pub use page_table::PageTableEntry;

Modules

-
address 🔒

Implementation of physical and virtual address and page number.

+

Re-exports

pub use address::PhysAddr;
pub use address::PhysPageNum;
pub use address::VirtAddr;
pub use address::VirtPageNum;
pub use frame_allocator::frame_alloc;
pub use frame_allocator::FrameTracker;
pub use memory_set::remap_test;
pub use memory_set::MapPermission;
pub use memory_set::MemorySet;
pub use memory_set::KERNEL_SPACE;
pub use memory_set::KERNEL_SPACE;
pub use page_table::translated_byte_buffer;
pub use page_table::PageTableEntry;

Modules

address 🔒

Implementation of physical and virtual address and page number.

Implementation of FrameAllocator which controls all the frames in the operating system.

The global allocator

memory_set 🔒

Implementation of MapArea and MemorySet.

page_table 🔒

Implementation of PageTableEntry and PageTable.

-

Functions

-

initiate heap allocator, frame allocator and kernel space

-
- \ No newline at end of file +

Functions

initiate heap allocator, frame allocator and kernel space

+
\ No newline at end of file diff --git a/ch4/os/mm/memory_set/enum.MapType.html b/ch4/os/mm/memory_set/enum.MapType.html index 73847548..7385a193 100644 --- a/ch4/os/mm/memory_set/enum.MapType.html +++ b/ch4/os/mm/memory_set/enum.MapType.html @@ -1,11 +1,4 @@ -MapType in os::mm::memory_set - Rust -
pub enum MapType {
+MapType in os::mm::memory_set - Rust
pub enum MapType {
     Identical,
     Framed,
 }
Expand description

map type for memory set: identical or framed

@@ -14,7 +7,7 @@

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

-

This method tests for !=.

+

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

@@ -25,9 +18,8 @@ by ==.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/mm/memory_set/fn.ebss.html b/ch4/os/mm/memory_set/fn.ebss.html index d75928c1..2a0370ef 100644 --- a/ch4/os/mm/memory_set/fn.ebss.html +++ b/ch4/os/mm/memory_set/fn.ebss.html @@ -1,9 +1 @@ -ebss in os::mm::memory_set - Rust -
-

Function os::mm::memory_set::ebss

source · []
unsafe extern "C" fn ebss()
- \ No newline at end of file +ebss in os::mm::memory_set - Rust
unsafe extern "C" fn ebss()
\ No newline at end of file diff --git a/ch4/os/mm/memory_set/fn.edata.html b/ch4/os/mm/memory_set/fn.edata.html index 2645d94a..6a302adc 100644 --- a/ch4/os/mm/memory_set/fn.edata.html +++ b/ch4/os/mm/memory_set/fn.edata.html @@ -1,9 +1 @@ -edata in os::mm::memory_set - Rust -
-

Function os::mm::memory_set::edata

source · []
unsafe extern "C" fn edata()
- \ No newline at end of file +edata in os::mm::memory_set - Rust
unsafe extern "C" fn edata()
\ No newline at end of file diff --git a/ch4/os/mm/memory_set/fn.ekernel.html b/ch4/os/mm/memory_set/fn.ekernel.html index ce7d6ede..fa1ca605 100644 --- a/ch4/os/mm/memory_set/fn.ekernel.html +++ b/ch4/os/mm/memory_set/fn.ekernel.html @@ -1,9 +1 @@ -ekernel in os::mm::memory_set - Rust -
-

Function os::mm::memory_set::ekernel

source · []
unsafe extern "C" fn ekernel()
- \ No newline at end of file +ekernel in os::mm::memory_set - Rust
unsafe extern "C" fn ekernel()
\ No newline at end of file diff --git a/ch4/os/mm/memory_set/fn.erodata.html b/ch4/os/mm/memory_set/fn.erodata.html index b910e0be..3f832fcd 100644 --- a/ch4/os/mm/memory_set/fn.erodata.html +++ b/ch4/os/mm/memory_set/fn.erodata.html @@ -1,9 +1 @@ -erodata in os::mm::memory_set - Rust -
-

Function os::mm::memory_set::erodata

source · []
unsafe extern "C" fn erodata()
- \ No newline at end of file +erodata in os::mm::memory_set - Rust
unsafe extern "C" fn erodata()
\ No newline at end of file diff --git a/ch4/os/mm/memory_set/fn.etext.html b/ch4/os/mm/memory_set/fn.etext.html index 2b2a08e9..af2ef577 100644 --- a/ch4/os/mm/memory_set/fn.etext.html +++ b/ch4/os/mm/memory_set/fn.etext.html @@ -1,9 +1 @@ -etext in os::mm::memory_set - Rust -
-

Function os::mm::memory_set::etext

source · []
unsafe extern "C" fn etext()
- \ No newline at end of file +etext in os::mm::memory_set - Rust
unsafe extern "C" fn etext()
\ No newline at end of file diff --git a/ch4/os/mm/memory_set/fn.remap_test.html b/ch4/os/mm/memory_set/fn.remap_test.html index eff08292..9b882377 100644 --- a/ch4/os/mm/memory_set/fn.remap_test.html +++ b/ch4/os/mm/memory_set/fn.remap_test.html @@ -1,9 +1 @@ -remap_test in os::mm::memory_set - Rust -
pub fn remap_test()
- \ No newline at end of file +remap_test in os::mm::memory_set - Rust
pub fn remap_test()
\ No newline at end of file diff --git a/ch4/os/mm/memory_set/fn.sbss_with_stack.html b/ch4/os/mm/memory_set/fn.sbss_with_stack.html index d06c2f92..ff6a23d9 100644 --- a/ch4/os/mm/memory_set/fn.sbss_with_stack.html +++ b/ch4/os/mm/memory_set/fn.sbss_with_stack.html @@ -1,9 +1 @@ -sbss_with_stack in os::mm::memory_set - Rust -
unsafe extern "C" fn sbss_with_stack()
- \ No newline at end of file +sbss_with_stack in os::mm::memory_set - Rust
unsafe extern "C" fn sbss_with_stack()
\ No newline at end of file diff --git a/ch4/os/mm/memory_set/fn.sdata.html b/ch4/os/mm/memory_set/fn.sdata.html index 94235e4f..14623d15 100644 --- a/ch4/os/mm/memory_set/fn.sdata.html +++ b/ch4/os/mm/memory_set/fn.sdata.html @@ -1,9 +1 @@ -sdata in os::mm::memory_set - Rust -
-

Function os::mm::memory_set::sdata

source · []
unsafe extern "C" fn sdata()
- \ No newline at end of file +sdata in os::mm::memory_set - Rust
unsafe extern "C" fn sdata()
\ No newline at end of file diff --git a/ch4/os/mm/memory_set/fn.srodata.html b/ch4/os/mm/memory_set/fn.srodata.html index bb8eec89..3396a2d8 100644 --- a/ch4/os/mm/memory_set/fn.srodata.html +++ b/ch4/os/mm/memory_set/fn.srodata.html @@ -1,9 +1 @@ -srodata in os::mm::memory_set - Rust -
-

Function os::mm::memory_set::srodata

source · []
unsafe extern "C" fn srodata()
- \ No newline at end of file +srodata in os::mm::memory_set - Rust
unsafe extern "C" fn srodata()
\ No newline at end of file diff --git a/ch4/os/mm/memory_set/fn.stext.html b/ch4/os/mm/memory_set/fn.stext.html index d913cf6f..7208091d 100644 --- a/ch4/os/mm/memory_set/fn.stext.html +++ b/ch4/os/mm/memory_set/fn.stext.html @@ -1,9 +1 @@ -stext in os::mm::memory_set - Rust -
-

Function os::mm::memory_set::stext

source · []
unsafe extern "C" fn stext()
- \ No newline at end of file +stext in os::mm::memory_set - Rust
unsafe extern "C" fn stext()
\ No newline at end of file diff --git a/ch4/os/mm/memory_set/fn.strampoline.html b/ch4/os/mm/memory_set/fn.strampoline.html index 7300da4d..f8b2b465 100644 --- a/ch4/os/mm/memory_set/fn.strampoline.html +++ b/ch4/os/mm/memory_set/fn.strampoline.html @@ -1,9 +1 @@ -strampoline in os::mm::memory_set - Rust -
unsafe extern "C" fn strampoline()
- \ No newline at end of file +strampoline in os::mm::memory_set - Rust
unsafe extern "C" fn strampoline()
\ No newline at end of file diff --git a/ch4/os/mm/memory_set/index.html b/ch4/os/mm/memory_set/index.html index c3111afe..954c3a5a 100644 --- a/ch4/os/mm/memory_set/index.html +++ b/ch4/os/mm/memory_set/index.html @@ -1,18 +1,7 @@ -os::mm::memory_set - Rust -
-

Module os::mm::memory_set

source · []
Expand description

Implementation of MapArea and MemorySet.

-

Structs

-

a memory set instance through lazy_static! managing kernel space

+os::mm::memory_set - Rust
Expand description

Implementation of MapArea and MemorySet.

+

Structs

a memory set instance through lazy_static! managing kernel space

map area structure, controls a contiguous piece of virtual memory

map permission corresponding to that in pte: R W X U

memory set structure, controls virtual-memory space

-

Enums

-

map type for memory set: identical or framed

-

Functions

-
- \ No newline at end of file +

Enums

map type for memory set: identical or framed

+

Functions

\ No newline at end of file diff --git a/ch4/os/mm/memory_set/struct.KERNEL_SPACE.html b/ch4/os/mm/memory_set/struct.KERNEL_SPACE.html index 0ab151ad..cd46620e 100644 --- a/ch4/os/mm/memory_set/struct.KERNEL_SPACE.html +++ b/ch4/os/mm/memory_set/struct.KERNEL_SPACE.html @@ -1,11 +1,4 @@ -KERNEL_SPACE in os::mm::memory_set - Rust -
pub struct KERNEL_SPACE {
+KERNEL_SPACE in os::mm::memory_set - Rust
pub struct KERNEL_SPACE {
     __private_field: (),
 }
Expand description

a memory set instance through lazy_static! managing kernel space

Fields

__private_field: ()

Trait Implementations

The resulting type after dereferencing.

@@ -17,9 +10,8 @@

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/mm/memory_set/struct.MapArea.html b/ch4/os/mm/memory_set/struct.MapArea.html index 77992a59..0297f8d9 100644 --- a/ch4/os/mm/memory_set/struct.MapArea.html +++ b/ch4/os/mm/memory_set/struct.MapArea.html @@ -1,11 +1,4 @@ -MapArea in os::mm::memory_set - Rust -
pub struct MapArea {
+MapArea in os::mm::memory_set - Rust
pub struct MapArea {
     vpn_range: SimpleRange<VirtPageNum>,
     data_frames: BTreeMap<VirtPageNum, FrameTracker>,
     map_type: MapType,
@@ -20,9 +13,8 @@ assume that all frames were cleared before

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/mm/memory_set/struct.MapPermission.html b/ch4/os/mm/memory_set/struct.MapPermission.html index cdc90a1d..205e64ba 100644 --- a/ch4/os/mm/memory_set/struct.MapPermission.html +++ b/ch4/os/mm/memory_set/struct.MapPermission.html @@ -1,11 +1,4 @@ -MapPermission in os::mm::memory_set - Rust -
pub struct MapPermission {
+MapPermission in os::mm::memory_set - Rust
pub struct MapPermission {
     bits: u8,
 }
Expand description

map permission corresponding to that in pte: R W X U

Fields

bits: u8

Implementations

Returns an empty set of flags.

@@ -90,18 +83,18 @@ between Self::all()<

The resulting type after applying the ! operator.

Formats the value using the given formatter.

This method returns an Ordering between self and other. Read more

-

Compares and returns the maximum of two values. Read more

-

Compares and returns the minimum of two values. Read more

-

Restrict a value to a certain interval. Read more

+

Compares and returns the maximum of two values. Read more

+

Compares and returns the minimum of two values. Read more

+

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

-

This method tests less than (for self and other) and is used by the < operator. Read more

-

This method tests less than or equal to (for self and other) and is used by the <= +

This method tests less than (for self and other) and is used by the < operator. Read more

+

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

-

This method tests greater than (for self and other) and is used by the > operator. Read more

-

This method tests greater than or equal to (for self and other) and is used by the >= +

This method tests greater than (for self and other) and is used by the > operator. Read more

+

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Returns the set difference of the two sets of flags.

The resulting type after applying the - operator.

@@ -117,9 +110,8 @@ operator.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/mm/memory_set/struct.MemorySet.html b/ch4/os/mm/memory_set/struct.MemorySet.html index 1a7bbde7..af26ab0d 100644 --- a/ch4/os/mm/memory_set/struct.MemorySet.html +++ b/ch4/os/mm/memory_set/struct.MemorySet.html @@ -1,11 +1,4 @@ -MemorySet in os::mm::memory_set - Rust -
pub struct MemorySet {
+MemorySet in os::mm::memory_set - Rust
pub struct MemorySet {
     page_table: PageTable,
     areas: Vec<MapArea>,
 }
Expand description

memory set structure, controls virtual-memory space

@@ -21,9 +14,8 @@ also returns user_sp and entry point.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/mm/page_table/fn.translated_byte_buffer.html b/ch4/os/mm/page_table/fn.translated_byte_buffer.html index dbba8c0a..b9fef8b9 100644 --- a/ch4/os/mm/page_table/fn.translated_byte_buffer.html +++ b/ch4/os/mm/page_table/fn.translated_byte_buffer.html @@ -1,10 +1,2 @@ -translated_byte_buffer in os::mm::page_table - Rust -
pub fn translated_byte_buffer(
    token: usize,
    ptr: *const u8,
    len: usize
) -> Vec<&'static mut [u8]>
Expand description

translate a pointer to a mutable u8 Vec through page table

-
- \ No newline at end of file +translated_byte_buffer in os::mm::page_table - Rust
pub fn translated_byte_buffer(
    token: usize,
    ptr: *const u8,
    len: usize
) -> Vec<&'static mut [u8]>
Expand description

translate a pointer to a mutable u8 Vec through page table

+
\ No newline at end of file diff --git a/ch4/os/mm/page_table/index.html b/ch4/os/mm/page_table/index.html index 2930bf11..f9e38b5a 100644 --- a/ch4/os/mm/page_table/index.html +++ b/ch4/os/mm/page_table/index.html @@ -1,16 +1,6 @@ -os::mm::page_table - Rust -
-

Module os::mm::page_table

source · []
Expand description

Implementation of PageTableEntry and PageTable.

-

Structs

-

page table entry flags

+os::mm::page_table - Rust
Expand description

Implementation of PageTableEntry and PageTable.

+

Structs

page table entry flags

page table structure

page table entry structure

-

Functions

-

translate a pointer to a mutable u8 Vec through page table

-
- \ No newline at end of file +

Functions

translate a pointer to a mutable u8 Vec through page table

+
\ No newline at end of file diff --git a/ch4/os/mm/page_table/struct.PTEFlags.html b/ch4/os/mm/page_table/struct.PTEFlags.html index c7592178..46f22a4e 100644 --- a/ch4/os/mm/page_table/struct.PTEFlags.html +++ b/ch4/os/mm/page_table/struct.PTEFlags.html @@ -1,11 +1,4 @@ -PTEFlags in os::mm::page_table - Rust -
pub struct PTEFlags {
+PTEFlags in os::mm::page_table - Rust
pub struct PTEFlags {
     bits: u8,
 }
Expand description

page table entry flags

Fields

bits: u8

Implementations

Returns an empty set of flags.

@@ -90,18 +83,18 @@ between Self::all() a

The resulting type after applying the ! operator.

Formats the value using the given formatter.

This method returns an Ordering between self and other. Read more

-

Compares and returns the maximum of two values. Read more

-

Compares and returns the minimum of two values. Read more

-

Restrict a value to a certain interval. Read more

+

Compares and returns the maximum of two values. Read more

+

Compares and returns the minimum of two values. Read more

+

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

-

This method tests less than (for self and other) and is used by the < operator. Read more

-

This method tests less than or equal to (for self and other) and is used by the <= +

This method tests less than (for self and other) and is used by the < operator. Read more

+

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

-

This method tests greater than (for self and other) and is used by the > operator. Read more

-

This method tests greater than or equal to (for self and other) and is used by the >= +

This method tests greater than (for self and other) and is used by the > operator. Read more

+

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Returns the set difference of the two sets of flags.

The resulting type after applying the - operator.

@@ -117,9 +110,8 @@ operator.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/mm/page_table/struct.PageTable.html b/ch4/os/mm/page_table/struct.PageTable.html index dd581a43..221aa2ce 100644 --- a/ch4/os/mm/page_table/struct.PageTable.html +++ b/ch4/os/mm/page_table/struct.PageTable.html @@ -1,11 +1,4 @@ -PageTable in os::mm::page_table - Rust -
pub struct PageTable {
+PageTable in os::mm::page_table - Rust
pub struct PageTable {
     root_ppn: PhysPageNum,
     frames: Vec<FrameTracker>,
 }
Expand description

page table structure

@@ -18,9 +11,8 @@

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/mm/page_table/struct.PageTableEntry.html b/ch4/os/mm/page_table/struct.PageTableEntry.html index 3fe9fe0c..c0ec38b7 100644 --- a/ch4/os/mm/page_table/struct.PageTableEntry.html +++ b/ch4/os/mm/page_table/struct.PageTableEntry.html @@ -1,11 +1,4 @@ -PageTableEntry in os::mm::page_table - Rust -
#[repr(C)]
pub struct PageTableEntry { +PageTableEntry in os::mm::page_table - Rust
#[repr(C)]
pub struct PageTableEntry { pub bits: usize, }
Expand description

page table entry structure

Fields

bits: usize

Implementations

Trait Implementations

Returns a copy of the value. Read more

@@ -20,9 +13,8 @@

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/sbi/constant.SBI_CONSOLE_PUTCHAR.html b/ch4/os/sbi/constant.SBI_CONSOLE_PUTCHAR.html index d58e82b5..10915495 100644 --- a/ch4/os/sbi/constant.SBI_CONSOLE_PUTCHAR.html +++ b/ch4/os/sbi/constant.SBI_CONSOLE_PUTCHAR.html @@ -1,9 +1 @@ -SBI_CONSOLE_PUTCHAR in os::sbi - Rust -
const SBI_CONSOLE_PUTCHAR: usize = 1;
- \ No newline at end of file +SBI_CONSOLE_PUTCHAR in os::sbi - Rust
const SBI_CONSOLE_PUTCHAR: usize = 1;
\ No newline at end of file diff --git a/ch4/os/sbi/constant.SBI_SET_TIMER.html b/ch4/os/sbi/constant.SBI_SET_TIMER.html index ea199df8..0d9f9f56 100644 --- a/ch4/os/sbi/constant.SBI_SET_TIMER.html +++ b/ch4/os/sbi/constant.SBI_SET_TIMER.html @@ -1,9 +1 @@ -SBI_SET_TIMER in os::sbi - Rust -
-

Constant os::sbi::SBI_SET_TIMER

source · []
const SBI_SET_TIMER: usize = 0;
- \ No newline at end of file +SBI_SET_TIMER in os::sbi - Rust
const SBI_SET_TIMER: usize = 0;
\ No newline at end of file diff --git a/ch4/os/sbi/fn.console_putchar.html b/ch4/os/sbi/fn.console_putchar.html index fa6516bc..5b8d78d6 100644 --- a/ch4/os/sbi/fn.console_putchar.html +++ b/ch4/os/sbi/fn.console_putchar.html @@ -1,10 +1,2 @@ -console_putchar in os::sbi - Rust -
pub fn console_putchar(c: usize)
Expand description

use sbi call to putchar in console (qemu uart handler)

-
- \ No newline at end of file +console_putchar in os::sbi - Rust
pub fn console_putchar(c: usize)
Expand description

use sbi call to putchar in console (qemu uart handler)

+
\ No newline at end of file diff --git a/ch4/os/sbi/fn.sbi_call.html b/ch4/os/sbi/fn.sbi_call.html index 31f2ecd2..41cfcd42 100644 --- a/ch4/os/sbi/fn.sbi_call.html +++ b/ch4/os/sbi/fn.sbi_call.html @@ -1,10 +1,2 @@ -sbi_call in os::sbi - Rust -
-

Function os::sbi::sbi_call

source · []
fn sbi_call(which: usize, arg0: usize, arg1: usize, arg2: usize) -> usize
Expand description

general sbi call

-
- \ No newline at end of file +sbi_call in os::sbi - Rust

Function os::sbi::sbi_call

source · []
fn sbi_call(which: usize, arg0: usize, arg1: usize, arg2: usize) -> usize
Expand description

general sbi call

+
\ No newline at end of file diff --git a/ch4/os/sbi/fn.set_timer.html b/ch4/os/sbi/fn.set_timer.html index f0ab22bb..5a24d5ec 100644 --- a/ch4/os/sbi/fn.set_timer.html +++ b/ch4/os/sbi/fn.set_timer.html @@ -1,10 +1,2 @@ -set_timer in os::sbi - Rust -
-

Function os::sbi::set_timer

source · []
pub fn set_timer(timer: usize)
Expand description

use sbi call to set timer

-
- \ No newline at end of file +set_timer in os::sbi - Rust

Function os::sbi::set_timer

source · []
pub fn set_timer(timer: usize)
Expand description

use sbi call to set timer

+
\ No newline at end of file diff --git a/ch4/os/sbi/fn.shutdown.html b/ch4/os/sbi/fn.shutdown.html index 9037db13..7c95f6af 100644 --- a/ch4/os/sbi/fn.shutdown.html +++ b/ch4/os/sbi/fn.shutdown.html @@ -1,10 +1,2 @@ -shutdown in os::sbi - Rust -
-

Function os::sbi::shutdown

source · []
pub fn shutdown() -> !
Expand description

use sbi call to shutdown the kernel

-
- \ No newline at end of file +shutdown in os::sbi - Rust

Function os::sbi::shutdown

source · []
pub fn shutdown() -> !
Expand description

use sbi call to shutdown the kernel

+
\ No newline at end of file diff --git a/ch4/os/sbi/index.html b/ch4/os/sbi/index.html index 08d2cb6b..7cc72254 100644 --- a/ch4/os/sbi/index.html +++ b/ch4/os/sbi/index.html @@ -1,16 +1,6 @@ -os::sbi - Rust -
-

Module os::sbi

source · []
Expand description

SBI call wrappers

-

Constants

-

Functions

-

use sbi call to putchar in console (qemu uart handler)

+os::sbi - Rust

Module os::sbi

source · []
Expand description

SBI call wrappers

+

Constants

Functions

use sbi call to putchar in console (qemu uart handler)

sbi_call 🔒

general sbi call

use sbi call to set timer

use sbi call to shutdown the kernel

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/sync/index.html b/ch4/os/sync/index.html index 4d142dbe..eea82f9a 100644 --- a/ch4/os/sync/index.html +++ b/ch4/os/sync/index.html @@ -1,13 +1,3 @@ -os::sync - Rust -
-

Module os::sync

source · []
Expand description

Synchronization and interior mutability primitives

-

Re-exports

-
pub use up::UPSafeCell;

Modules

-
up 🔒

Uniprocessor interior mutability primitives

-
- \ No newline at end of file +os::sync - Rust

Module os::sync

source · []
Expand description

Synchronization and interior mutability primitives

+

Re-exports

pub use up::UPSafeCell;

Modules

up 🔒

Uniprocessor interior mutability primitives

+
\ No newline at end of file diff --git a/ch4/os/sync/up/index.html b/ch4/os/sync/up/index.html index efd0451f..cab43616 100644 --- a/ch4/os/sync/up/index.html +++ b/ch4/os/sync/up/index.html @@ -1,13 +1,4 @@ -os::sync::up - Rust -
-

Module os::sync::up

source · []
Expand description

Uniprocessor interior mutability primitives

-

Structs

-

Wrap a static data structure inside it so that we are +os::sync::up - Rust

Module os::sync::up

source · []
Expand description

Uniprocessor interior mutability primitives

+

Structs

Wrap a static data structure inside it so that we are able to access it without any unsafe.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/sync/up/struct.UPSafeCell.html b/ch4/os/sync/up/struct.UPSafeCell.html index 04213d68..62465d24 100644 --- a/ch4/os/sync/up/struct.UPSafeCell.html +++ b/ch4/os/sync/up/struct.UPSafeCell.html @@ -1,11 +1,4 @@ -UPSafeCell in os::sync::up - Rust -
-

Struct os::sync::up::UPSafeCell

source · []
pub struct UPSafeCell<T> {
+UPSafeCell in os::sync::up - Rust
pub struct UPSafeCell<T> {
     inner: RefCell<T>,
 }
Expand description

Wrap a static data structure inside it so that we are able to access it without any unsafe.

@@ -23,9 +16,8 @@ uniprocessor.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/syscall/constant.SYSCALL_EXIT.html b/ch4/os/syscall/constant.SYSCALL_EXIT.html index 8d3fc661..cb68704e 100644 --- a/ch4/os/syscall/constant.SYSCALL_EXIT.html +++ b/ch4/os/syscall/constant.SYSCALL_EXIT.html @@ -1,9 +1 @@ -SYSCALL_EXIT in os::syscall - Rust -
const SYSCALL_EXIT: usize = 93;
- \ No newline at end of file +SYSCALL_EXIT in os::syscall - Rust
const SYSCALL_EXIT: usize = 93;
\ No newline at end of file diff --git a/ch4/os/syscall/constant.SYSCALL_GET_TIME.html b/ch4/os/syscall/constant.SYSCALL_GET_TIME.html index bd024963..1f28ac14 100644 --- a/ch4/os/syscall/constant.SYSCALL_GET_TIME.html +++ b/ch4/os/syscall/constant.SYSCALL_GET_TIME.html @@ -1,9 +1 @@ -SYSCALL_GET_TIME in os::syscall - Rust -
const SYSCALL_GET_TIME: usize = 169;
- \ No newline at end of file +SYSCALL_GET_TIME in os::syscall - Rust
const SYSCALL_GET_TIME: usize = 169;
\ No newline at end of file diff --git a/ch4/os/syscall/constant.SYSCALL_WRITE.html b/ch4/os/syscall/constant.SYSCALL_WRITE.html index 794f0b06..d90f659f 100644 --- a/ch4/os/syscall/constant.SYSCALL_WRITE.html +++ b/ch4/os/syscall/constant.SYSCALL_WRITE.html @@ -1,9 +1 @@ -SYSCALL_WRITE in os::syscall - Rust -
const SYSCALL_WRITE: usize = 64;
- \ No newline at end of file +SYSCALL_WRITE in os::syscall - Rust
const SYSCALL_WRITE: usize = 64;
\ No newline at end of file diff --git a/ch4/os/syscall/constant.SYSCALL_YIELD.html b/ch4/os/syscall/constant.SYSCALL_YIELD.html index 581eb4f1..b4d92a07 100644 --- a/ch4/os/syscall/constant.SYSCALL_YIELD.html +++ b/ch4/os/syscall/constant.SYSCALL_YIELD.html @@ -1,9 +1 @@ -SYSCALL_YIELD in os::syscall - Rust -
const SYSCALL_YIELD: usize = 124;
- \ No newline at end of file +SYSCALL_YIELD in os::syscall - Rust
const SYSCALL_YIELD: usize = 124;
\ No newline at end of file diff --git a/ch4/os/syscall/fn.syscall.html b/ch4/os/syscall/fn.syscall.html index 64ef0c87..7bff603b 100644 --- a/ch4/os/syscall/fn.syscall.html +++ b/ch4/os/syscall/fn.syscall.html @@ -1,10 +1,2 @@ -syscall in os::syscall - Rust -
-

Function os::syscall::syscall

source · []
pub fn syscall(syscall_id: usize, args: [usize; 3]) -> isize
Expand description

handle syscall exception with syscall_id and other arguments

-
- \ No newline at end of file +syscall in os::syscall - Rust
pub fn syscall(syscall_id: usize, args: [usize; 3]) -> isize
Expand description

handle syscall exception with syscall_id and other arguments

+
\ No newline at end of file diff --git a/ch4/os/syscall/fs/constant.FD_STDOUT.html b/ch4/os/syscall/fs/constant.FD_STDOUT.html index eec6bed8..2ca5fb5d 100644 --- a/ch4/os/syscall/fs/constant.FD_STDOUT.html +++ b/ch4/os/syscall/fs/constant.FD_STDOUT.html @@ -1,9 +1 @@ -FD_STDOUT in os::syscall::fs - Rust -
-

Constant os::syscall::fs::FD_STDOUT

source · []
const FD_STDOUT: usize = 1;
- \ No newline at end of file +FD_STDOUT in os::syscall::fs - Rust
const FD_STDOUT: usize = 1;
\ No newline at end of file diff --git a/ch4/os/syscall/fs/fn.sys_write.html b/ch4/os/syscall/fs/fn.sys_write.html index 2b0b75ee..6b4ee104 100644 --- a/ch4/os/syscall/fs/fn.sys_write.html +++ b/ch4/os/syscall/fs/fn.sys_write.html @@ -1,10 +1,2 @@ -sys_write in os::syscall::fs - Rust -
-

Function os::syscall::fs::sys_write

source · []
pub fn sys_write(fd: usize, buf: *const u8, len: usize) -> isize
Expand description

write buf of length len to a file with fd

-
- \ No newline at end of file +sys_write in os::syscall::fs - Rust
pub fn sys_write(fd: usize, buf: *const u8, len: usize) -> isize
Expand description

write buf of length len to a file with fd

+
\ No newline at end of file diff --git a/ch4/os/syscall/fs/index.html b/ch4/os/syscall/fs/index.html index bcc6512a..8d7781bd 100644 --- a/ch4/os/syscall/fs/index.html +++ b/ch4/os/syscall/fs/index.html @@ -1,13 +1,3 @@ -os::syscall::fs - Rust -
-

Module os::syscall::fs

source · []
Expand description

File and filesystem-related syscalls

-

Constants

-
FD_STDOUT 🔒

Functions

-

write buf of length len to a file with fd

-
- \ No newline at end of file +os::syscall::fs - Rust

Module os::syscall::fs

source · []
Expand description

File and filesystem-related syscalls

+

Constants

FD_STDOUT 🔒

Functions

write buf of length len to a file with fd

+
\ No newline at end of file diff --git a/ch4/os/syscall/index.html b/ch4/os/syscall/index.html index cdd26e5e..53b83b60 100644 --- a/ch4/os/syscall/index.html +++ b/ch4/os/syscall/index.html @@ -1,11 +1,4 @@ -os::syscall - Rust -
-

Module os::syscall

source · []
Expand description

Implementation of syscalls

+os::syscall - Rust
Expand description

Implementation of syscalls

The single entry point to all system calls, syscall(), is called whenever userspace wishes to perform a system call using the ecall instruction. In this case, the processor raises an ‘Environment call from @@ -14,11 +7,7 @@ U-mode’ exception, which is handled as one of the cases in

For clarity, each single syscall is implemented as its own function, named sys_ then the name of the syscall. You can find functions like this in submodules, and you should also implement syscalls this way.

-

Modules

-
fs 🔒

File and filesystem-related syscalls

+

Modules

fs 🔒

File and filesystem-related syscalls

process 🔒

Process management syscalls

-

Constants

-

Functions

-

handle syscall exception with syscall_id and other arguments

-
- \ No newline at end of file +

Constants

Functions

handle syscall exception with syscall_id and other arguments

+
\ No newline at end of file diff --git a/ch4/os/syscall/process/fn.sys_exit.html b/ch4/os/syscall/process/fn.sys_exit.html index 591e417d..d3630de3 100644 --- a/ch4/os/syscall/process/fn.sys_exit.html +++ b/ch4/os/syscall/process/fn.sys_exit.html @@ -1,10 +1,2 @@ -sys_exit in os::syscall::process - Rust -
pub fn sys_exit(exit_code: i32) -> !
Expand description

task exits and submit an exit code

-
- \ No newline at end of file +sys_exit in os::syscall::process - Rust
pub fn sys_exit(exit_code: i32) -> !
Expand description

task exits and submit an exit code

+
\ No newline at end of file diff --git a/ch4/os/syscall/process/fn.sys_get_time.html b/ch4/os/syscall/process/fn.sys_get_time.html index c5046ada..1622e9c3 100644 --- a/ch4/os/syscall/process/fn.sys_get_time.html +++ b/ch4/os/syscall/process/fn.sys_get_time.html @@ -1,10 +1,2 @@ -sys_get_time in os::syscall::process - Rust -
pub fn sys_get_time() -> isize
Expand description

get current time

-
- \ No newline at end of file +sys_get_time in os::syscall::process - Rust
pub fn sys_get_time() -> isize
Expand description

get current time

+
\ No newline at end of file diff --git a/ch4/os/syscall/process/fn.sys_yield.html b/ch4/os/syscall/process/fn.sys_yield.html index 8ad9e565..f52906df 100644 --- a/ch4/os/syscall/process/fn.sys_yield.html +++ b/ch4/os/syscall/process/fn.sys_yield.html @@ -1,10 +1,2 @@ -sys_yield in os::syscall::process - Rust -
pub fn sys_yield() -> isize
Expand description

current task gives up resources for other tasks

-
- \ No newline at end of file +sys_yield in os::syscall::process - Rust
pub fn sys_yield() -> isize
Expand description

current task gives up resources for other tasks

+
\ No newline at end of file diff --git a/ch4/os/syscall/process/index.html b/ch4/os/syscall/process/index.html index 8b202459..fc64b93c 100644 --- a/ch4/os/syscall/process/index.html +++ b/ch4/os/syscall/process/index.html @@ -1,14 +1,5 @@ -os::syscall::process - Rust -
-

Module os::syscall::process

source · []
Expand description

Process management syscalls

-

Functions

-

task exits and submit an exit code

+os::syscall::process - Rust
Expand description

Process management syscalls

+

Functions

task exits and submit an exit code

get current time

current task gives up resources for other tasks

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/task/context/index.html b/ch4/os/task/context/index.html index 7d49b20b..9240d663 100644 --- a/ch4/os/task/context/index.html +++ b/ch4/os/task/context/index.html @@ -1,12 +1,3 @@ -os::task::context - Rust -
-

Module os::task::context

source · []
Expand description

Implementation of TaskContext

-

Structs

-

task context structure containing some registers

-
- \ No newline at end of file +os::task::context - Rust
Expand description

Implementation of TaskContext

+

Structs

task context structure containing some registers

+
\ No newline at end of file diff --git a/ch4/os/task/context/struct.TaskContext.html b/ch4/os/task/context/struct.TaskContext.html index 3e2f1391..a7a30583 100644 --- a/ch4/os/task/context/struct.TaskContext.html +++ b/ch4/os/task/context/struct.TaskContext.html @@ -1,11 +1,4 @@ -TaskContext in os::task::context - Rust -
#[repr(C)]
pub struct TaskContext { +TaskContext in os::task::context - Rust
#[repr(C)]
pub struct TaskContext { ra: usize, sp: usize, s: [usize; 12], @@ -22,9 +15,8 @@

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/task/fn.current_trap_cx.html b/ch4/os/task/fn.current_trap_cx.html index 857631c9..f31b3c29 100644 --- a/ch4/os/task/fn.current_trap_cx.html +++ b/ch4/os/task/fn.current_trap_cx.html @@ -1,10 +1,2 @@ -current_trap_cx in os::task - Rust -
pub fn current_trap_cx() -> &'static mut TrapContext
Expand description

Get the current ‘Running’ task’s trap contexts.

-
- \ No newline at end of file +current_trap_cx in os::task - Rust
pub fn current_trap_cx() -> &'static mut TrapContext
Expand description

Get the current ‘Running’ task’s trap contexts.

+
\ No newline at end of file diff --git a/ch4/os/task/fn.current_user_token.html b/ch4/os/task/fn.current_user_token.html index 3eebd474..e6647b3e 100644 --- a/ch4/os/task/fn.current_user_token.html +++ b/ch4/os/task/fn.current_user_token.html @@ -1,10 +1,2 @@ -current_user_token in os::task - Rust -
pub fn current_user_token() -> usize
Expand description

Get the current ‘Running’ task’s token.

-
- \ No newline at end of file +current_user_token in os::task - Rust
pub fn current_user_token() -> usize
Expand description

Get the current ‘Running’ task’s token.

+
\ No newline at end of file diff --git a/ch4/os/task/fn.exit_current_and_run_next.html b/ch4/os/task/fn.exit_current_and_run_next.html index 50c2eab2..90ca5667 100644 --- a/ch4/os/task/fn.exit_current_and_run_next.html +++ b/ch4/os/task/fn.exit_current_and_run_next.html @@ -1,10 +1,2 @@ -exit_current_and_run_next in os::task - Rust -
pub fn exit_current_and_run_next()
Expand description

Exit the current ‘Running’ task and run the next task in task list.

-
- \ No newline at end of file +exit_current_and_run_next in os::task - Rust
pub fn exit_current_and_run_next()
Expand description

Exit the current ‘Running’ task and run the next task in task list.

+
\ No newline at end of file diff --git a/ch4/os/task/fn.mark_current_exited.html b/ch4/os/task/fn.mark_current_exited.html index d45fb139..52d586be 100644 --- a/ch4/os/task/fn.mark_current_exited.html +++ b/ch4/os/task/fn.mark_current_exited.html @@ -1,10 +1,2 @@ -mark_current_exited in os::task - Rust -
fn mark_current_exited()
Expand description

Change the status of current Running task into Exited.

-
- \ No newline at end of file +mark_current_exited in os::task - Rust
fn mark_current_exited()
Expand description

Change the status of current Running task into Exited.

+
\ No newline at end of file diff --git a/ch4/os/task/fn.mark_current_suspended.html b/ch4/os/task/fn.mark_current_suspended.html index 02bd52ca..0622aa90 100644 --- a/ch4/os/task/fn.mark_current_suspended.html +++ b/ch4/os/task/fn.mark_current_suspended.html @@ -1,10 +1,2 @@ -mark_current_suspended in os::task - Rust -
fn mark_current_suspended()
Expand description

Change the status of current Running task into Ready.

-
- \ No newline at end of file +mark_current_suspended in os::task - Rust
fn mark_current_suspended()
Expand description

Change the status of current Running task into Ready.

+
\ No newline at end of file diff --git a/ch4/os/task/fn.run_first_task.html b/ch4/os/task/fn.run_first_task.html index 5b5a71e0..7f5ff5ac 100644 --- a/ch4/os/task/fn.run_first_task.html +++ b/ch4/os/task/fn.run_first_task.html @@ -1,10 +1,2 @@ -run_first_task in os::task - Rust -
pub fn run_first_task()
Expand description

Run the first task in task list.

-
- \ No newline at end of file +run_first_task in os::task - Rust
pub fn run_first_task()
Expand description

Run the first task in task list.

+
\ No newline at end of file diff --git a/ch4/os/task/fn.run_next_task.html b/ch4/os/task/fn.run_next_task.html index a866d1c0..874c2fdf 100644 --- a/ch4/os/task/fn.run_next_task.html +++ b/ch4/os/task/fn.run_next_task.html @@ -1,11 +1,3 @@ -run_next_task in os::task - Rust -
-

Function os::task::run_next_task

source · []
fn run_next_task()
Expand description

Switch current Running task to the task we have found, +run_next_task in os::task - Rust

fn run_next_task()
Expand description

Switch current Running task to the task we have found, or there is no Ready task and we can exit with all applications completed

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/task/fn.suspend_current_and_run_next.html b/ch4/os/task/fn.suspend_current_and_run_next.html index ea6f3f66..3531d99b 100644 --- a/ch4/os/task/fn.suspend_current_and_run_next.html +++ b/ch4/os/task/fn.suspend_current_and_run_next.html @@ -1,10 +1,2 @@ -suspend_current_and_run_next in os::task - Rust -
pub fn suspend_current_and_run_next()
Expand description

Suspend the current ‘Running’ task and run the next task in task list.

-
- \ No newline at end of file +suspend_current_and_run_next in os::task - Rust
pub fn suspend_current_and_run_next()
Expand description

Suspend the current ‘Running’ task and run the next task in task list.

+
\ No newline at end of file diff --git a/ch4/os/task/index.html b/ch4/os/task/index.html index b16b0221..227d5aab 100644 --- a/ch4/os/task/index.html +++ b/ch4/os/task/index.html @@ -1,28 +1,18 @@ -os::task - Rust -
-

Module os::task

source · []
Expand description

Task management implementation

+os::task - Rust

Module os::task

source · []
Expand description

Task management implementation

Everything about task management, like starting and switching tasks is implemented here.

A single global instance of TaskManager called TASK_MANAGER controls all the tasks in the operating system.

Be careful when you see __switch ASM function in switch.S. Control flow around this function might not be what you expect.

-

Modules

-
context 🔒

Implementation of TaskContext

+

Modules

context 🔒

Implementation of TaskContext

switch 🔒

Rust wrapper around __switch.

task 🔒

Types related to task management

-

Structs

-

a TaskManager global instance through lazy_static!

+

Structs

a TaskManager global instance through lazy_static!

task context structure containing some registers

The task manager, where all the tasks are managed.

The task manager inner in ‘UPSafeCell’

-

Functions

-

Get the current ‘Running’ task’s trap contexts.

+

Functions

Get the current ‘Running’ task’s trap contexts.

Get the current ‘Running’ task’s token.

Exit the current ‘Running’ task and run the next task in task list.

Change the status of current Running task into Exited.

@@ -31,5 +21,4 @@ might not be what you expect.

Switch current Running task to the task we have found, or there is no Ready task and we can exit with all applications completed

Suspend the current ‘Running’ task and run the next task in task list.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/task/struct.TASK_MANAGER.html b/ch4/os/task/struct.TASK_MANAGER.html index ad78ec9f..fd1dd9c6 100644 --- a/ch4/os/task/struct.TASK_MANAGER.html +++ b/ch4/os/task/struct.TASK_MANAGER.html @@ -1,11 +1,4 @@ -TASK_MANAGER in os::task - Rust -
pub struct TASK_MANAGER {
+TASK_MANAGER in os::task - Rust
pub struct TASK_MANAGER {
     __private_field: (),
 }
Expand description

a TaskManager global instance through lazy_static!

Fields

__private_field: ()

Methods from Deref<Target = TaskManager>

Run the first task in task list.

@@ -28,9 +21,8 @@ or there is no Ready task and we can exit with all applications com

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/task/struct.TaskContext.html b/ch4/os/task/struct.TaskContext.html index 8edf1423..7bd810b1 100644 --- a/ch4/os/task/struct.TaskContext.html +++ b/ch4/os/task/struct.TaskContext.html @@ -1,11 +1,4 @@ -TaskContext in os::task - Rust -
#[repr(C)]
pub struct TaskContext { +TaskContext in os::task - Rust
#[repr(C)]
pub struct TaskContext { ra: usize, sp: usize, s: [usize; 12], @@ -22,9 +15,8 @@

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/task/struct.TaskManager.html b/ch4/os/task/struct.TaskManager.html index 46b6a222..ffb56bcf 100644 --- a/ch4/os/task/struct.TaskManager.html +++ b/ch4/os/task/struct.TaskManager.html @@ -1,11 +1,4 @@ -TaskManager in os::task - Rust -
pub struct TaskManager {
+TaskManager in os::task - Rust
pub struct TaskManager {
     num_app: usize,
     inner: UPSafeCell<TaskManagerInner>,
 }
Expand description

The task manager, where all the tasks are managed.

@@ -35,9 +28,8 @@ or there is no Ready task and we can exit with all applications com

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/task/struct.TaskManagerInner.html b/ch4/os/task/struct.TaskManagerInner.html index 0870375d..cda2bf2b 100644 --- a/ch4/os/task/struct.TaskManagerInner.html +++ b/ch4/os/task/struct.TaskManagerInner.html @@ -1,11 +1,4 @@ -TaskManagerInner in os::task - Rust -
struct TaskManagerInner {
+TaskManagerInner in os::task - Rust
struct TaskManagerInner {
     tasks: Vec<TaskControlBlock>,
     current_task: usize,
 }
Expand description

The task manager inner in ‘UPSafeCell’

@@ -18,9 +11,8 @@

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/task/switch/fn.__switch.html b/ch4/os/task/switch/fn.__switch.html index fe36b1fa..1bda6159 100644 --- a/ch4/os/task/switch/fn.__switch.html +++ b/ch4/os/task/switch/fn.__switch.html @@ -1,11 +1,3 @@ -__switch in os::task::switch - Rust -
-

Function os::task::switch::__switch

source · []
pub unsafe extern "C" fn __switch(
    current_task_cx_ptr: *mut TaskContext,
    next_task_cx_ptr: *const TaskContext
)
Expand description

Switch to the context of next_task_cx_ptr, saving the current context +__switch in os::task::switch - Rust

pub unsafe extern "C" fn __switch(
    current_task_cx_ptr: *mut TaskContext,
    next_task_cx_ptr: *const TaskContext
)
Expand description

Switch to the context of next_task_cx_ptr, saving the current context in current_task_cx_ptr.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/task/switch/index.html b/ch4/os/task/switch/index.html index c5ef5d39..3233f3f7 100644 --- a/ch4/os/task/switch/index.html +++ b/ch4/os/task/switch/index.html @@ -1,17 +1,8 @@ -os::task::switch - Rust -
-

Module os::task::switch

source · []
Expand description

Rust wrapper around __switch.

+os::task::switch - Rust
Expand description

Rust wrapper around __switch.

Switching to a different task’s context happens here. The actual implementation must not be in Rust and (essentially) has to be in assembly language (Do you know why?), so this module really is just a wrapper around switch.S.

-

Functions

-

Switch to the context of next_task_cx_ptr, saving the current context +

Functions

Switch to the context of next_task_cx_ptr, saving the current context in current_task_cx_ptr.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/task/task/enum.TaskStatus.html b/ch4/os/task/task/enum.TaskStatus.html index 403e931d..1c84c56b 100644 --- a/ch4/os/task/task/enum.TaskStatus.html +++ b/ch4/os/task/task/enum.TaskStatus.html @@ -1,11 +1,4 @@ -TaskStatus in os::task::task - Rust -
pub enum TaskStatus {
+TaskStatus in os::task::task - Rust
pub enum TaskStatus {
     Ready,
     Running,
     Exited,
@@ -14,7 +7,7 @@
 

Performs copy-assignment from source. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

-

This method tests for !=.

+

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

@@ -25,9 +18,8 @@ by ==.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/task/task/index.html b/ch4/os/task/task/index.html index c9a456dd..df5b77c6 100644 --- a/ch4/os/task/task/index.html +++ b/ch4/os/task/task/index.html @@ -1,14 +1,4 @@ -os::task::task - Rust -
-

Module os::task::task

source · []
Expand description

Types related to task management

-

Structs

-

task control block structure

-

Enums

-

task status: UnInit, Ready, Running, Exited

-
- \ No newline at end of file +os::task::task - Rust

Module os::task::task

source · []
Expand description

Types related to task management

+

Structs

task control block structure

+

Enums

task status: UnInit, Ready, Running, Exited

+
\ No newline at end of file diff --git a/ch4/os/task/task/struct.TaskControlBlock.html b/ch4/os/task/task/struct.TaskControlBlock.html index bb152248..79ee5f48 100644 --- a/ch4/os/task/task/struct.TaskControlBlock.html +++ b/ch4/os/task/task/struct.TaskControlBlock.html @@ -1,11 +1,4 @@ -TaskControlBlock in os::task::task - Rust -
pub struct TaskControlBlock {
+TaskControlBlock in os::task::task - Rust
pub struct TaskControlBlock {
     pub task_status: TaskStatus,
     pub task_cx: TaskContext,
     pub memory_set: MemorySet,
@@ -19,9 +12,8 @@
 

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/timer/constant.MSEC_PER_SEC.html b/ch4/os/timer/constant.MSEC_PER_SEC.html index 8028d0be..b225d5c1 100644 --- a/ch4/os/timer/constant.MSEC_PER_SEC.html +++ b/ch4/os/timer/constant.MSEC_PER_SEC.html @@ -1,9 +1 @@ -MSEC_PER_SEC in os::timer - Rust -
-

Constant os::timer::MSEC_PER_SEC

source · []
const MSEC_PER_SEC: usize = 1000;
- \ No newline at end of file +MSEC_PER_SEC in os::timer - Rust
const MSEC_PER_SEC: usize = 1000;
\ No newline at end of file diff --git a/ch4/os/timer/constant.TICKS_PER_SEC.html b/ch4/os/timer/constant.TICKS_PER_SEC.html index e12aee06..d61f9ec0 100644 --- a/ch4/os/timer/constant.TICKS_PER_SEC.html +++ b/ch4/os/timer/constant.TICKS_PER_SEC.html @@ -1,9 +1 @@ -TICKS_PER_SEC in os::timer - Rust -
const TICKS_PER_SEC: usize = 100;
- \ No newline at end of file +TICKS_PER_SEC in os::timer - Rust
const TICKS_PER_SEC: usize = 100;
\ No newline at end of file diff --git a/ch4/os/timer/fn.get_time.html b/ch4/os/timer/fn.get_time.html index b91e65c5..b23ed808 100644 --- a/ch4/os/timer/fn.get_time.html +++ b/ch4/os/timer/fn.get_time.html @@ -1,9 +1 @@ -get_time in os::timer - Rust -
-

Function os::timer::get_time

source · []
pub fn get_time() -> usize
- \ No newline at end of file +get_time in os::timer - Rust
pub fn get_time() -> usize
\ No newline at end of file diff --git a/ch4/os/timer/fn.get_time_ms.html b/ch4/os/timer/fn.get_time_ms.html index 245afd11..282b85d3 100644 --- a/ch4/os/timer/fn.get_time_ms.html +++ b/ch4/os/timer/fn.get_time_ms.html @@ -1,10 +1,2 @@ -get_time_ms in os::timer - Rust -
-

Function os::timer::get_time_ms

source · []
pub fn get_time_ms() -> usize
Expand description

get current time in microseconds

-
- \ No newline at end of file +get_time_ms in os::timer - Rust
pub fn get_time_ms() -> usize
Expand description

get current time in microseconds

+
\ No newline at end of file diff --git a/ch4/os/timer/fn.set_next_trigger.html b/ch4/os/timer/fn.set_next_trigger.html index c7e25b04..f4cfaa28 100644 --- a/ch4/os/timer/fn.set_next_trigger.html +++ b/ch4/os/timer/fn.set_next_trigger.html @@ -1,10 +1,2 @@ -set_next_trigger in os::timer - Rust -
pub fn set_next_trigger()
Expand description

set the next timer interrupt

-
- \ No newline at end of file +set_next_trigger in os::timer - Rust
pub fn set_next_trigger()
Expand description

set the next timer interrupt

+
\ No newline at end of file diff --git a/ch4/os/timer/index.html b/ch4/os/timer/index.html index ca2ea554..2effb9d7 100644 --- a/ch4/os/timer/index.html +++ b/ch4/os/timer/index.html @@ -1,14 +1,4 @@ -os::timer - Rust -
-

Module os::timer

source · []
Expand description

RISC-V timer-related functionality

-

Constants

-

Functions

-

get current time in microseconds

+os::timer - Rust

Module os::timer

source · []
Expand description

RISC-V timer-related functionality

+

Constants

Functions

get current time in microseconds

set the next timer interrupt

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/trap/context/index.html b/ch4/os/trap/context/index.html index e7a97a9b..d8c3b3a5 100644 --- a/ch4/os/trap/context/index.html +++ b/ch4/os/trap/context/index.html @@ -1,12 +1,3 @@ -os::trap::context - Rust -
-

Module os::trap::context

source · []
Expand description

Implementation of TrapContext

-

Structs

-

trap context structure containing sstatus, sepc and registers

-
- \ No newline at end of file +os::trap::context - Rust
Expand description

Implementation of TrapContext

+

Structs

trap context structure containing sstatus, sepc and registers

+
\ No newline at end of file diff --git a/ch4/os/trap/context/struct.TrapContext.html b/ch4/os/trap/context/struct.TrapContext.html index 49c46c2f..28c621b3 100644 --- a/ch4/os/trap/context/struct.TrapContext.html +++ b/ch4/os/trap/context/struct.TrapContext.html @@ -1,11 +1,4 @@ -TrapContext in os::trap::context - Rust -
#[repr(C)]
pub struct TrapContext { +TrapContext in os::trap::context - Rust
#[repr(C)]
pub struct TrapContext { pub x: [usize; 32], pub sstatus: Sstatus, pub sepc: usize, @@ -28,9 +21,8 @@

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/trap/fn.enable_timer_interrupt.html b/ch4/os/trap/fn.enable_timer_interrupt.html index f89a3737..ec8889f5 100644 --- a/ch4/os/trap/fn.enable_timer_interrupt.html +++ b/ch4/os/trap/fn.enable_timer_interrupt.html @@ -1,10 +1,2 @@ -enable_timer_interrupt in os::trap - Rust -
pub fn enable_timer_interrupt()
Expand description

enable timer interrupt in sie CSR

-
- \ No newline at end of file +enable_timer_interrupt in os::trap - Rust
pub fn enable_timer_interrupt()
Expand description

enable timer interrupt in sie CSR

+
\ No newline at end of file diff --git a/ch4/os/trap/fn.init.html b/ch4/os/trap/fn.init.html index f550aa9f..d11daa6b 100644 --- a/ch4/os/trap/fn.init.html +++ b/ch4/os/trap/fn.init.html @@ -1,10 +1,2 @@ -init in os::trap - Rust -
-

Function os::trap::init

source · []
pub fn init()
Expand description

initialize CSR stvec as the entry of __alltraps

-
- \ No newline at end of file +init in os::trap - Rust

Function os::trap::init

source · []
pub fn init()
Expand description

initialize CSR stvec as the entry of __alltraps

+
\ No newline at end of file diff --git a/ch4/os/trap/fn.set_kernel_trap_entry.html b/ch4/os/trap/fn.set_kernel_trap_entry.html index 2f99ec25..98112e69 100644 --- a/ch4/os/trap/fn.set_kernel_trap_entry.html +++ b/ch4/os/trap/fn.set_kernel_trap_entry.html @@ -1,9 +1 @@ -set_kernel_trap_entry in os::trap - Rust -
fn set_kernel_trap_entry()
- \ No newline at end of file +set_kernel_trap_entry in os::trap - Rust
fn set_kernel_trap_entry()
\ No newline at end of file diff --git a/ch4/os/trap/fn.set_user_trap_entry.html b/ch4/os/trap/fn.set_user_trap_entry.html index a9d502c1..20ddcfe8 100644 --- a/ch4/os/trap/fn.set_user_trap_entry.html +++ b/ch4/os/trap/fn.set_user_trap_entry.html @@ -1,9 +1 @@ -set_user_trap_entry in os::trap - Rust -
fn set_user_trap_entry()
- \ No newline at end of file +set_user_trap_entry in os::trap - Rust
fn set_user_trap_entry()
\ No newline at end of file diff --git a/ch4/os/trap/fn.trap_from_kernel.html b/ch4/os/trap/fn.trap_from_kernel.html index f455e67e..11dab648 100644 --- a/ch4/os/trap/fn.trap_from_kernel.html +++ b/ch4/os/trap/fn.trap_from_kernel.html @@ -1,12 +1,4 @@ -trap_from_kernel in os::trap - Rust -
#[no_mangle]
+trap_from_kernel in os::trap - Rust
#[no_mangle]
 pub fn trap_from_kernel() -> !
Expand description

Unimplement: traps/interrupts/exceptions from kernel mode Todo: Chapter 9: I/O device

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/trap/fn.trap_handler.html b/ch4/os/trap/fn.trap_handler.html index e09dc437..443d43bc 100644 --- a/ch4/os/trap/fn.trap_handler.html +++ b/ch4/os/trap/fn.trap_handler.html @@ -1,11 +1,3 @@ -trap_handler in os::trap - Rust -
-

Function os::trap::trap_handler

source · []
#[no_mangle]
+trap_handler in os::trap - Rust
#[no_mangle]
 pub fn trap_handler() -> !
Expand description

handle an interrupt, exception, or system call from user space

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/trap/fn.trap_return.html b/ch4/os/trap/fn.trap_return.html index 8ca13f03..a2d0786a 100644 --- a/ch4/os/trap/fn.trap_return.html +++ b/ch4/os/trap/fn.trap_return.html @@ -1,13 +1,5 @@ -trap_return in os::trap - Rust -
-

Function os::trap::trap_return

source · []
#[no_mangle]
+trap_return in os::trap - Rust
#[no_mangle]
 pub fn trap_return() -> !
Expand description

set the new addr of __restore asm function in TRAMPOLINE page, set the reg a0 = trap_cx_ptr, reg a1 = phy addr of usr page table, finally, jump to new addr of __restore asm function

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/trap/index.html b/ch4/os/trap/index.html index 21de6495..2fdcda47 100644 --- a/ch4/os/trap/index.html +++ b/ch4/os/trap/index.html @@ -1,11 +1,4 @@ -os::trap - Rust -
-

Module os::trap

source · []
Expand description

Trap handling functionality

+os::trap - Rust

Module os::trap

source · []
Expand description

Trap handling functionality

For rCore, we have a single trap entry point, namely __alltraps. At initialization in init(), we set the stvec CSR to point to it.

All traps go through __alltraps, which is defined in trap.S. The @@ -15,12 +8,9 @@ context, ensuring that Rust code safely runs, and transfers control to

It then calls different functionality based on what exactly the exception was. For example, timer interrupts trigger task preemption, and syscalls go to syscall().

-

Modules

-
context 🔒

Implementation of TrapContext

-

Structs

-

trap context structure containing sstatus, sepc and registers

-

Functions

-

enable timer interrupt in sie CSR

+

Modules

context 🔒

Implementation of TrapContext

+

Structs

trap context structure containing sstatus, sepc and registers

+

Functions

enable timer interrupt in sie CSR

initialize CSR stvec as the entry of __alltraps

Unimplement: traps/interrupts/exceptions from kernel mode Todo: Chapter 9: I/O device

@@ -28,5 +18,4 @@ Todo: Chapter 9: I/O device

set the new addr of __restore asm function in TRAMPOLINE page, set the reg a0 = trap_cx_ptr, reg a1 = phy addr of usr page table, finally, jump to new addr of __restore asm function

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/os/trap/struct.TrapContext.html b/ch4/os/trap/struct.TrapContext.html index 71eb3ab4..08d10f6a 100644 --- a/ch4/os/trap/struct.TrapContext.html +++ b/ch4/os/trap/struct.TrapContext.html @@ -1,11 +1,4 @@ -TrapContext in os::trap - Rust -
#[repr(C)]
pub struct TrapContext { +TrapContext in os::trap - Rust
#[repr(C)]
pub struct TrapContext { pub x: [usize; 32], pub sstatus: Sstatus, pub sepc: usize, @@ -28,9 +21,8 @@

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-

The type returned in the event of a conversion error.

+

The type returned in the event of a conversion error.

Performs the conversion.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/rustdoc.css b/ch4/rustdoc.css index fa48adc4..2e22b4cf 100644 --- a/ch4/rustdoc.css +++ b/ch4/rustdoc.css @@ -1 +1 @@ - @font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}html{content:"";}@media (prefers-color-scheme:light){html{content:"light";}}@media (prefers-color-scheme:dark){html{content:"dark";}}body{font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;-webkit-font-feature-settings:"kern","liga";-moz-font-feature-settings:"kern","liga";font-feature-settings:"kern","liga";background-color:var(--main-background-color);color:var(--main-color);}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:20px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}h1.fqn{margin:0;padding:0;border-bottom-color:var(--headings-border-bottom-color);}h2,h3,h4{border-bottom-color:var(--headings-border-bottom-color);}.main-heading{display:flex;flex-wrap:wrap;justify-content:space-between;padding-bottom:6px;margin-bottom:15px;}.main-heading a:hover{text-decoration:underline;}#toggle-all-docs{text-decoration:none;}h2,.top-doc .docblock>h3,.top-doc .docblock>h4{border-bottom:1px solid;}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;border-bottom-style:none;margin:0;padding:0;margin-top:0.6em;margin-bottom:0.4em;}.impl,.impl-items .method,.methods .method,.impl-items .type,.methods .type,.impl-items .associatedconstant,.methods .associatedconstant,.impl-items .associatedtype,.methods .associatedtype{flex-basis:100%;font-weight:600;position:relative;}div.impl-items>div{padding-left:0;}h1,h2,h3,h4,h5,h6,.sidebar,.mobile-topbar,a.source,.search-input,.search-results .result-name,.content table td:first-child>a,.item-left>a,.out-of-band,span.since,#source-sidebar,#sidebar-toggle,details.rustdoc-toggle>summary::before,div.impl-items>div:not(.docblock):not(.item-info),.content ul.crate a.crate,a.srclink,#main-content>ul.docblock>li>a{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}h1,h2,h3,h4,a#toggle-all-docs,a.anchor,.small-section-header a,#source-sidebar a,pre.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,.in-band a,.search-results a,.module-item .stab,.import-item .stab,.result-name .primitive>i,.result-name .keyword>i,.content .method .where,.content .fn .where,.content .where.fmt-newline{color:var(--main-color);}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p{margin:0 0 .75em 0;}summary{outline:none;}td,th{padding:0;}table{border-collapse:collapse;}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0;}button{padding:1px 6px;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.source main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}.source .width-limiter{max-width:unset;}details:not(.rustdoc-toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.docblock-short pre code{padding:0;}pre{padding:14px;}.docblock.item-decl{margin-left:0;}.item-decl pre{overflow-x:auto;}.source .content pre{padding:20px;}img{max-width:100%;}li{position:relative;}.source .content{max-width:none;overflow:visible;margin-left:0px;}nav.sub{position:relative;font-size:1rem;}.sub-container{display:flex;flex-direction:row;flex-wrap:nowrap;}.sub-logo-container{display:none;margin-right:20px;}.source .sub-logo-container{display:block;}.source .sub-logo-container>img{height:60px;width:60px;object-fit:contain;}.sidebar,.mobile-topbar,.sidebar-menu-toggle{background-color:var(--sidebar-background-color);}.sidebar{font-size:0.875rem;width:250px;min-width:200px;overflow-y:scroll;position:sticky;height:100vh;top:0;left:0;}.sidebar-elems,.sidebar>.location{padding-left:24px;}.sidebar .location{overflow-wrap:anywhere;}.rustdoc.source .sidebar{width:50px;min-width:0px;max-width:300px;flex-grow:0;flex-shrink:0;flex-basis:auto;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;}.rustdoc.source .sidebar .sidebar-logo{display:none;}.source .sidebar,#sidebar-toggle,#source-sidebar{background-color:var(--sidebar-background-color);}#sidebar-toggle>button:hover,#sidebar-toggle>button:focus{background-color:var(--sidebar-background-color-hover);}.source .sidebar>*:not(#sidebar-toggle){opacity:0;visibility:hidden;}.source-sidebar-expanded .source .sidebar{overflow-y:auto;}.source-sidebar-expanded .source .sidebar>*:not(#sidebar-toggle){opacity:1;visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;scrollbar-color:var(--scrollbar-color);}.sidebar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-color);}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;background-color:var(--scrollbar-track-background-color);}.sidebar::-webkit-scrollbar-track{background-color:var(--scrollbar-track-background-color);}::-webkit-scrollbar-thumb,.sidebar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-background-color);}.hidden{display:none !important;}.sidebar .logo-container{display:flex;margin-top:10px;margin-bottom:10px;justify-content:center;}.version{overflow-wrap:break-word;}.logo-container>img{height:100px;width:100px;}.location:empty{border:none;}.location a:first-of-type{font-weight:500;}.block{padding:0;}.block ul,.block li{padding:0;margin:0;list-style:none;}.block a,h2.location a{display:block;padding:0.25rem;margin-left:-0.25rem;text-overflow:ellipsis;overflow:hidden;}.sidebar h2{border-bottom:none;font-weight:500;padding:0;margin:0;margin-top:0.7rem;margin-bottom:0.7rem;}.sidebar h3{font-size:1.125rem;font-weight:500;padding:0;margin:0;}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;}.mobile-topbar{display:none;}.source .content pre.rust{white-space:pre;overflow:auto;padding-left:0;}.rustdoc .example-wrap{display:inline-flex;margin-bottom:10px;}.example-wrap{position:relative;width:100%;}.example-wrap>pre.line-number{overflow:initial;border:1px solid;padding:13px 8px;text-align:right;border-top-left-radius:5px;border-bottom-left-radius:5px;}.example-wrap>pre.rust a:hover{text-decoration:underline;}.line-numbers{text-align:right;}.rustdoc:not(.source) .example-wrap>pre:not(.line-number){width:100%;overflow-x:auto;}.rustdoc:not(.source) .example-wrap>pre.line-numbers{width:auto;overflow-x:visible;}.rustdoc .example-wrap>pre{margin:0;}#search{position:relative;}.search-loading{text-align:center;}#results>table{width:100%;table-layout:fixed;}.content>.example-wrap pre.line-numbers{position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.line-numbers span{cursor:pointer;}.docblock-short{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock-short p{display:inline;}.docblock-short p{overflow:hidden;text-overflow:ellipsis;margin:0;}.docblock>:not(pre)>code,.docblock-short>:not(pre)>code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5,.docblock h6{border-bottom-color:var(--headings-border-bottom-color);}.docblock{margin-left:24px;position:relative;}.docblock>:not(.information):not(.more-examples-toggle){max-width:100%;overflow-x:auto;}.content .out-of-band{flex-grow:0;font-size:1.125rem;font-weight:normal;float:right;}.method>.code-header,.trait-impl>.code-header{max-width:calc(100% - 41px);display:block;}.content .in-band{flex-grow:1;margin:0px;padding:0px;overflow-wrap:break-word;overflow-wrap:anywhere;}.in-band>code,.in-band>.code-header{display:inline-block;}.docblock code,.docblock-short code,pre,.rustdoc.source .example-wrap{background-color:var(--code-block-background-color);}#main-content{position:relative;}#main-content>.since{top:inherit;font-family:"Fira Sans",Arial,sans-serif;}.content table:not(.table-display){border-spacing:0 5px;}.content td{vertical-align:top;}.content td:first-child{padding-right:20px;}.content td p:first-child{margin-top:0;}.content td h1,.content td h2{margin-left:0;font-size:1.125rem;}.content tr:first-child td{border-top:0;}.docblock table{margin:.5em 0;width:calc(100% - 2px);overflow-x:auto;display:block;}.docblock table td{padding:.5em;border:1px dashed;}.docblock table th{padding:.5em;text-align:left;border:1px solid;}.fields+table{margin-bottom:1em;}.content .item-list{list-style-type:none;padding:0;}.content .multi-column{-moz-column-count:5;-moz-column-gap:2.5em;-webkit-column-count:5;-webkit-column-gap:2.5em;column-count:5;column-gap:2.5em;}.content .multi-column li{width:100%;display:inline-block;}.content>.methods>.method{font-size:1rem;position:relative;}.content .method .where,.content .fn .where,.content .where.fmt-newline{display:block;font-size:0.875rem;}.content .methods>div:not(.notable-traits):not(.method){margin-left:40px;margin-bottom:15px;}.content .docblock>.impl-items{margin-left:20px;margin-top:-34px;}.content .docblock>.impl-items .table-display{margin:0;}.content .docblock>.impl-items table td{padding:0;}.content .docblock>.impl-items .table-display,.impl-items table td{border:none;}.item-info{display:block;}.content .item-info code{font-size:0.875rem;}.content .item-info{position:relative;margin-left:24px;}.sub-variant>div>.item-info{margin-top:initial;}.content .impl-items .docblock,.content .impl-items .item-info{margin-bottom:.6em;}.content .impl-items>.item-info{margin-left:40px;}.methods>.item-info,.content .impl-items>.item-info{margin-top:-8px;}.impl-items{flex-basis:100%;}#main-content>.item-info{margin-top:0;margin-left:0;}nav.sub{flex-grow:1;margin-bottom:25px;}.source nav.sub{margin-left:32px;}nav.main{padding:20px 0;text-align:center;}nav.main .current{border-top:1px solid;border-bottom:1px solid;}nav.main .separator{border:1px solid;display:inline-block;height:23px;margin:0 20px;}nav.sum{text-align:right;}nav.sub form{display:inline;}a{text-decoration:none;background:transparent;}.small-section-header{display:flex;justify-content:space-between;position:relative;}.small-section-header:hover>.anchor{display:initial;}.in-band:hover>.anchor,.impl:hover>.anchor,.method.trait-impl:hover>.anchor,.type.trait-impl:hover>.anchor,.associatedconstant.trait-impl:hover>.anchor,.associatedtype.trait-impl:hover>.anchor{display:inline-block;position:absolute;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.small-section-header>.anchor{left:-15px;padding-right:8px;}h2.small-section-header>.anchor{padding-right:6px;}.anchor::before{content:'§';}.docblock a:not(.srclink):not(.test-arrow):not(.scrape-help):hover,.docblock-short a:not(.srclink):not(.test-arrow):not(.scrape-help):hover,.item-info a{text-decoration:underline;}.block a.current.crate{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{display:table;}.item-row{display:table-row;}.item-left,.item-right{display:table-cell;}.item-left{padding-right:1.25rem;}.search-container{position:relative;display:flex;height:34px;}.search-container>*{height:100%;}.search-results-title{display:inline;}#search-settings{font-size:1.5rem;font-weight:500;margin-bottom:20px;}#crate-search{min-width:115px;margin-top:5px;padding-left:0.3125em;padding-right:23px;border:1px solid;border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;text-overflow:"";background-repeat:no-repeat;background-color:transparent;background-size:20px;background-position:calc(100% - 1px) 56%;background-image:url("down-arrow.svg");max-width:100%;text-overflow:ellipsis;}.search-container{margin-top:4px;}.search-input{-webkit-appearance:none;-moz-box-sizing:border-box !important;box-sizing:border-box !important;outline:none;border:1px solid;border-radius:2px;padding:8px;font-size:1rem;transition:border-color 300ms ease;width:100%;}.search-results{display:none;padding-bottom:2em;}.search-results.active{display:block;clear:both;}.search-results .desc>span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block;}.search-results>a{display:block;width:100%;margin-left:2px;margin-right:2px;border-bottom:1px solid #aaa3;}.search-results>a>div{display:flex;flex-flow:row wrap;}.search-results .result-name,.search-results div.desc,.search-results .result-description{width:50%;}.search-results .result-name{padding-right:1em;}.search-results .result-name>span{display:inline-block;margin:0;font-weight:normal;}.popover{font-size:1rem;position:absolute;right:0;z-index:2;display:block;margin-top:7px;border-radius:3px;border:1px solid;font-size:1rem;}.popover::before{content:'';position:absolute;right:11px;border:solid;border-width:1px 1px 0 0;display:inline-block;padding:4px;transform:rotate(-45deg);top:-5px;}.popover,.popover::before{background-color:var(--main-background-color);color:var(--main-color);}#help-button .popover{max-width:600px;}#help-button .popover::before{right:48px;}#help-button dt{float:left;clear:left;display:block;margin-right:0.5rem;}#help-button span.top,#help-button span.bottom{text-align:center;display:block;font-size:1.125rem;}#help-button span.top{text-align:center;display:block;margin:10px 0;border-bottom:1px solid;padding-bottom:4px;margin-bottom:6px;}#help-button span.bottom{clear:both;border-top:1px solid;}.side-by-side{text-align:initial;}.side-by-side>div{width:50%;float:left;padding:0 20px 20px 17px;}.item-info .stab{display:inline-block;}.stab{padding:3px;margin-bottom:5px;font-size:0.875rem;font-weight:normal;}.stab p{display:inline;}.stab .emoji{font-size:1.25rem;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.module-item .stab,.import-item .stab{border-radius:3px;display:inline-block;font-size:0.875rem;line-height:1.2;margin-bottom:0;margin-left:0.3125em;padding:2px;vertical-align:text-bottom;}.module-item.unstable,.import-item.unstable{opacity:0.65;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;padding-right:2px;position:initial;}.impl-items .srclink,.impl .srclink,.methods .srclink{font-weight:normal;font-size:1rem;}.rightside{float:right;}.variants_table{width:100%;}.variants_table tbody tr td:first-child{width:1%;}td.summary-column{width:100%;}.summary{padding-right:0px;}pre.rust .question-mark{font-weight:bold;}a.test-arrow{display:inline-block;visibility:hidden;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:1.375rem;top:5px;right:5px;z-index:1;}.example-wrap:hover .test-arrow{visibility:visible;}a.test-arrow:hover{text-decoration:none;}.code-attribute{font-weight:300;}.item-spacer{width:100%;height:12px;}.out-of-band>span.since{position:initial;font-size:1.25rem;}h3.variant{font-weight:600;font-size:1.125rem;margin-bottom:10px;border-bottom:none;}.sub-variant h4{font-size:1rem;font-weight:400;border-bottom:none;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}.toggle-label{display:inline-block;margin-left:4px;margin-top:3px;}:target>code,:target>.code-header{opacity:1;}:target{padding-right:3px;}.information{position:absolute;left:-25px;margin-top:7px;z-index:1;}.tooltip{position:relative;display:inline-block;cursor:pointer;}.tooltip::after{display:none;text-align:center;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;font-size:1rem;}.tooltip.ignore::after{content:"This example is not tested";}.tooltip.compile_fail::after{content:"This example deliberately fails to compile";}.tooltip.should_panic::after{content:"This example panics";}.tooltip.edition::after{content:"This code runs with edition " attr(data-edition);}.tooltip::before{content:" ";position:absolute;top:50%;left:16px;margin-top:-5px;border-width:5px;border-style:solid;display:none;}.tooltip:hover::before,.tooltip:hover::after{display:inline;}.tooltip.compile_fail,.tooltip.should_panic,.tooltip.ignore{font-weight:bold;font-size:1.25rem;}.notable-traits-tooltip{display:inline-block;cursor:pointer;}.notable-traits:hover .notable-traits-tooltiptext,.notable-traits .notable-traits-tooltiptext.force-tooltip{display:inline-block;}.notable-traits .notable-traits-tooltiptext{display:none;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;z-index:10;font-size:1rem;cursor:default;position:absolute;border:1px solid;}.notable-traits-tooltip::after{content:"\00a0\00a0\00a0";}.notable-traits .notable,.notable-traits .docblock{margin:0;}.notable-traits .notable{margin:0;margin-bottom:13px;font-size:1.1875rem;font-weight:600;display:block;}.notable-traits .docblock code.content{margin:0;padding:0;font-size:1.25rem;}pre.rust.rust-example-rendered{position:relative;}pre.rust{tab-size:4;-moz-tab-size:4;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#titles{height:35px;}#titles>button{float:left;width:33.3%;text-align:center;font-size:1.125rem;cursor:pointer;border:0;border-top:2px solid;}#titles>button:first-child:last-child{margin-right:1px;width:calc(100% - 1px);}#titles>button:not(:last-child){margin-right:1px;width:calc(33.3% - 1px);}#titles>button>div.count{display:inline-block;font-size:1rem;}.notable-traits{cursor:pointer;z-index:2;margin-left:5px;}#sidebar-toggle{position:sticky;top:0;left:0;font-weight:bold;font-size:1.25rem;border-bottom:1px solid;display:flex;height:40px;justify-content:center;align-items:center;z-index:10;}#source-sidebar{width:100%;z-index:1;overflow:auto;}#source-sidebar>.title{font-size:1.5rem;text-align:center;border-bottom:1px solid;margin-bottom:6px;}#sidebar-toggle>button{background:none;color:inherit;cursor:pointer;text-align:center;border:none;outline:none;position:absolute;top:0;bottom:0;left:0;right:0;width:100%;-webkit-appearance:none;opacity:1;}#settings-menu,#help-button{margin-left:4px;outline:none;}#copy-path{height:34px;}#settings-menu>a,#help-button>button,#copy-path{padding:5px;width:33px;border:1px solid;border-radius:2px;cursor:pointer;}#settings-menu{padding:0;}#settings-menu>a,#help-button>button{padding:5px;height:100%;display:block;}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}#settings-menu.rotate>a img{animation:rotating 2s linear infinite;}.setting-line .radio-line input:checked{box-shadow:inset 0 0 0 3px var(--main-background-color);background-color:var(--settings-input-color);}.setting-line .radio-line input:focus{box-shadow:0 0 1px 1px var(--settings-input-color);}.setting-line .radio-line input:checked:focus{box-shadow:inset 0 0 0 3px var(--main-background-color),0 0 2px 2px var(--settings-input-color);}.setting-line .radio-line input:hover{border-color:var(--settings-input-color) !important;}input:checked+.slider{background-color:var(--settings-input-color);}#help-button>button{font-family:"Fira Sans",Arial,sans-serif;text-align:center;font-size:20px;padding-top:2px;}#copy-path{background:initial;margin-left:10px;padding:0;padding-left:2px;border:0;}#theme-choices{display:none;position:absolute;left:0;top:28px;border:1px solid;border-radius:3px;z-index:1;cursor:pointer;}#theme-choices>button{border:none;width:100%;padding:4px 8px;text-align:center;background:rgba(0,0,0,0);overflow-wrap:normal;}#theme-choices>button:not(:first-child){border-top:1px solid;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px;border-radius:3px;cursor:default;}.hidden-by-impl-hider,.hidden-by-usual-hider{display:none !important;}#implementations-list>h3>span.in-band{width:100%;}.table-display{width:100%;border:0;border-collapse:collapse;border-spacing:0;font-size:1rem;}.table-display tr td:first-child{padding-right:0;}.table-display tr td:last-child{float:right;}.table-display .out-of-band{position:relative;font-size:1.125rem;display:block;}.table-display td:hover .anchor{display:block;top:2px;left:-5px;}#main-content>ul{padding-left:10px;}#main-content>ul>li{list-style:none;}.non-exhaustive{margin-bottom:1em;}details.dir-entry{padding-left:4px;}details.dir-entry>summary{margin:0 0 0 13px;list-style-position:outside;cursor:pointer;}details.dir-entry div.folders,details.dir-entry div.files{padding-left:23px;}details.dir-entry a{display:block;}details.rustdoc-toggle>summary.hideme{cursor:pointer;}details.rustdoc-toggle>summary{list-style:none;}details.rustdoc-toggle>summary::-webkit-details-marker,details.rustdoc-toggle>summary::marker{display:none;}details.rustdoc-toggle>summary.hideme>span{margin-left:9px;}details.rustdoc-toggle>summary::before{content:"";cursor:pointer;width:16px;height:16px;background-repeat:no-repeat;background-position:top left;display:inline-block;vertical-align:middle;opacity:.5;}details.rustdoc-toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.rustdoc-toggle>summary.hideme::after{content:"";}details.rustdoc-toggle>summary:focus::before,details.rustdoc-toggle>summary:hover::before{opacity:1;}details.rustdoc-toggle.top-doc>summary,details.rustdoc-toggle.top-doc>summary::before,details.rustdoc-toggle.non-exhaustive>summary,details.rustdoc-toggle.non-exhaustive>summary::before{font-family:'Fira Sans';font-size:1rem;}details.non-exhaustive{margin-bottom:8px;}details.rustdoc-toggle>summary.hideme::before{position:relative;}details.rustdoc-toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.rustdoc-toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}details.rustdoc-toggle[open] >summary.hideme{position:absolute;}details.rustdoc-toggle{position:relative;}details.rustdoc-toggle[open] >summary.hideme>span{display:none;}details.rustdoc-toggle[open] >summary::before,details.rustdoc-toggle[open] >summary.hideme::before{background-image:url("toggle-minus.svg");}details.rustdoc-toggle>summary::before{background-image:url("toggle-plus.svg");}details.rustdoc-toggle[open] >summary::before,details.rustdoc-toggle[open] >summary.hideme::before{width:16px;height:16px;background-repeat:no-repeat;background-position:top left;display:inline-block;content:"";}details.rustdoc-toggle[open] >summary::after,details.rustdoc-toggle[open] >summary.hideme::after{content:"Collapse";}.docblock summary>*{display:inline-block;}@media (min-width:701px){.docblock>.information:first-child>.tooltip{margin-top:16px;}.source-sidebar-expanded .source .sidebar+main .width-limiter .sub-logo-container.rust-logo{display:none;}.source-sidebar-expanded .source .sidebar{width:300px;}}@media (max-width:700px){*[id]{scroll-margin-top:45px;}.rustdoc{padding-top:0px;display:block;}main{padding-left:15px;padding-top:0px;}.rustdoc,.main-heading{flex-direction:column;}.content .out-of-band{text-align:left;margin-left:initial;padding:initial;}.content .out-of-band .since::before{content:"Since ";}#copy-path{display:none;}.sidebar .sidebar-logo,.sidebar .location{display:none;}.sidebar-elems{margin-top:1em;}.sidebar{position:fixed;top:45px;left:-1000px;margin-left:0;background-color:rgba(0,0,0,0);margin:0;padding:0;z-index:11;height:calc(100vh - 45px);}.source main,.rustdoc.source .sidebar{top:0;padding:0;height:100vh;border:0;}.sidebar.shown,.source-sidebar-expanded .source .sidebar,.sidebar:focus-within{left:0;}.rustdoc.source>.sidebar{position:fixed;margin:0;z-index:11;width:0;}.mobile-topbar .location a{padding:0;margin:0;}.mobile-topbar .location{border:none;padding:0;margin:auto 0.5em auto auto;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:24px;}.mobile-topbar .logo-container{max-height:45px;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin-left:20px;margin-top:5px;margin-bottom:5px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.source .mobile-topbar{display:none;}.sidebar-menu-toggle{width:45px;font-size:32px;border:none;}.sidebar-elems{background-color:var(--sidebar-background-color);}.source nav:not(.sidebar).sub{margin-left:32px;}.content{margin-left:0px;}.source .content{margin-top:10px;}#search{margin-left:0;padding:0;}.anchor{display:none !important;}.notable-traits{position:absolute;left:-22px;top:24px;}#titles>button>div.count{float:left;width:100%;}#titles{height:50px;}#sidebar-filler{position:fixed;left:45px;width:calc(100% - 45px);top:0;height:45px;z-index:-1;border-bottom:1px solid;}#main-content>details.rustdoc-toggle>summary::before,#main-content>div>details.rustdoc-toggle>summary::before{left:-11px;}#sidebar-toggle{position:fixed;left:1px;top:100px;width:30px;font-size:1.5rem;text-align:center;padding:0;z-index:10;border-top-right-radius:3px;border-bottom-right-radius:3px;cursor:pointer;font-weight:bold;border:1px solid;border-left:0;}.source-sidebar-expanded #sidebar-toggle{left:unset;top:unset;width:unset;border-top-right-radius:unset;border-bottom-right-radius:unset;position:sticky;border:0;border-bottom:1px solid;}#source-sidebar{z-index:11;}#main-content>.line-numbers{margin-top:0;}.notable-traits .notable-traits-tooltiptext{left:0;top:100%;}#help-button{display:none;}.item-table{display:block;}.item-row{display:flex;flex-flow:column wrap;}.item-left,.item-right{width:100%;}.search-results>a{border-bottom:1px solid #aaa9;padding:5px 0px;}.search-results .result-name,.search-results div.desc,.search-results .result-description{width:100%;}.search-results div.desc,.search-results .result-description,.item-right{padding-left:2em;}.source-sidebar-expanded .source .sidebar{max-width:100vw;width:100vw;}details.rustdoc-toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.rustdoc-toggle>summary:not(.hideme)::before,#main-content>details.rustdoc-toggle:not(.top-doc)>summary::before,#main-content>div>details.rustdoc-toggle>summary::before{left:-11px;}}@media print{nav.sidebar,nav.sub,.content .out-of-band,a.srclink,#copy-path,details.rustdoc-toggle[open] >summary::before,details.rustdoc-toggle>summary::before,details.rustdoc-toggle.top-doc>summary{display:none;}.docblock{margin-left:0;}main{padding:10px;}}@media (max-width:464px){#titles,#titles>button{height:73px;}#main-content>table:not(.table-display) td{word-break:break-word;width:50%;}#crate-search{border-radius:4px;}.docblock{margin-left:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}.sub-container{flex-direction:column;}.sub-logo-container{align-self:center;}.source .sub-logo-container>img{height:35px;width:35px;}#sidebar-toggle{top:10px;}.source-sidebar-expanded #sidebar-toggle{top:unset;}}.method-toggle summary,.implementors-toggle summary,.impl{margin-bottom:0.75em;}.method-toggle[open]{margin-bottom:2em;}.implementors-toggle[open]{margin-bottom:2em;}#trait-implementations-list .method-toggle,#synthetic-implementations-list .method-toggle,#blanket-implementations-list .method-toggle{margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;background:transparent;border-width:1px;border-style:solid;border-radius:50px;}.scraped-example-title{font-family:'Fira Sans';}.scraped-example .code-wrapper{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;}.scraped-example:not(.expanded) .code-wrapper{max-height:240px;}.scraped-example:not(.expanded) .code-wrapper pre{overflow-y:hidden;max-height:240px;padding-bottom:0;}.scraped-example:not(.expanded) .code-wrapper pre.line-numbers{overflow-x:hidden;}.scraped-example .code-wrapper .prev{position:absolute;top:0.25em;right:2.25em;z-index:100;cursor:pointer;}.scraped-example .code-wrapper .next{position:absolute;top:0.25em;right:1.25em;z-index:100;cursor:pointer;}.scraped-example .code-wrapper .expand{position:absolute;top:0.25em;right:0.25em;z-index:100;cursor:pointer;}.scraped-example:not(.expanded) .code-wrapper:before{content:" ";width:100%;height:5px;position:absolute;z-index:100;top:0;}.scraped-example:not(.expanded) .code-wrapper:after{content:" ";width:100%;height:5px;position:absolute;z-index:100;bottom:0;}.scraped-example .code-wrapper .line-numbers{margin:0;padding:14px 0;}.scraped-example .code-wrapper .line-numbers span{padding:0 14px;}.scraped-example .code-wrapper .example-wrap{flex:1;overflow-x:auto;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded) .code-wrapper .example-wrap{overflow-x:hidden;}.scraped-example .code-wrapper .example-wrap pre.rust{overflow-x:inherit;width:inherit;overflow-y:hidden;}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;margin-bottom:5px;cursor:pointer;}.more-examples-toggle summary,.more-examples-toggle .hide-more{font-family:'Fira Sans';}.more-scraped-examples{margin-left:5px;display:flex;flex-direction:row;}.more-scraped-examples-inner{width:calc(100% - 20px);}.toggle-line{align-self:stretch;margin-right:10px;margin-top:5px;padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;}.more-scraped-examples .scraped-example{margin-bottom:20px;}.more-scraped-examples .scraped-example:last-child{margin-bottom:0;}.example-links a{margin-top:20px;font-family:'Fira Sans';}.example-links ul{margin-bottom:0;} \ No newline at end of file + @font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}html{content:"";}@media (prefers-color-scheme:light){html{content:"light";}}@media (prefers-color-scheme:dark){html{content:"dark";}}body{font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;-webkit-font-feature-settings:"kern","liga";-moz-font-feature-settings:"kern","liga";font-feature-settings:"kern","liga";background-color:var(--main-background-color);color:var(--main-color);}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:20px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}h1.fqn{margin:0;padding:0;border-bottom-color:var(--headings-border-bottom-color);}h2,h3,h4{border-bottom-color:var(--headings-border-bottom-color);}.main-heading{display:flex;flex-wrap:wrap;justify-content:space-between;padding-bottom:6px;margin-bottom:15px;}.main-heading a:hover{text-decoration:underline;}#toggle-all-docs{text-decoration:none;}h2,.top-doc .docblock>h3,.top-doc .docblock>h4{border-bottom:1px solid var(--headings-border-bottom-color);}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;border-bottom-style:none;margin:0;padding:0;margin-top:0.6em;margin-bottom:0.4em;}.impl,.impl-items .method,.methods .method,.impl-items .type,.methods .type,.impl-items .associatedconstant,.methods .associatedconstant,.impl-items .associatedtype,.methods .associatedtype{flex-basis:100%;font-weight:600;position:relative;}div.impl-items>div{padding-left:0;}h1,h2,h3,h4,h5,h6,.sidebar,.mobile-topbar,a.source,.search-input,.search-results .result-name,.content table td:first-child>a,.item-left>a,.out-of-band,span.since,#source-sidebar,#sidebar-toggle,details.rustdoc-toggle>summary::before,div.impl-items>div:not(.docblock):not(.item-info),.content ul.crate a.crate,a.srclink,#main-content>.since,#help-button>button,details.rustdoc-toggle.top-doc>summary,details.rustdoc-toggle.top-doc>summary::before,details.rustdoc-toggle.non-exhaustive>summary,details.rustdoc-toggle.non-exhaustive>summary::before,.scraped-example-title,.more-examples-toggle summary,.more-examples-toggle .hide-more,.example-links a,#main-content>ul.docblock>li>a{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}h1,h2,h3,h4,a#toggle-all-docs,a.anchor,.small-section-header a,#source-sidebar a,pre.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,.in-band a,.search-results a,.module-item .stab,.import-item .stab,.result-name .primitive>i,.result-name .keyword>i,.content .method .where,.content .fn .where,.content .where.fmt-newline{color:var(--main-color);}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p{margin:0 0 .75em 0;}summary{outline:none;}td,th{padding:0;}table{border-collapse:collapse;}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0;}button{padding:1px 6px;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.source main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}.source .width-limiter{max-width:unset;}details:not(.rustdoc-toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.docblock-short pre code{padding:0;}pre{padding:14px;}.docblock.item-decl{margin-left:0;}.item-decl pre{overflow-x:auto;}.source .content pre{padding:20px;}img{max-width:100%;}li{position:relative;}.source .content{max-width:none;overflow:visible;margin-left:0px;}nav.sub{position:relative;font-size:1rem;}.sub-container{display:flex;flex-direction:row;flex-wrap:nowrap;}.sub-logo-container{display:none;margin-right:20px;}.source .sub-logo-container{display:block;}.source .sub-logo-container>img{height:60px;width:60px;object-fit:contain;}.sidebar,.mobile-topbar,.sidebar-menu-toggle{background-color:var(--sidebar-background-color);}.sidebar{font-size:0.875rem;width:250px;min-width:200px;overflow-y:scroll;position:sticky;height:100vh;top:0;left:0;}.sidebar-elems,.sidebar>.location{padding-left:24px;}.sidebar .location{overflow-wrap:anywhere;}.rustdoc.source .sidebar{width:50px;min-width:0px;max-width:300px;flex-grow:0;flex-shrink:0;flex-basis:auto;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;}.rustdoc.source .sidebar .sidebar-logo{display:none;}.source .sidebar,#sidebar-toggle,#source-sidebar{background-color:var(--sidebar-background-color);}#sidebar-toggle>button:hover,#sidebar-toggle>button:focus{background-color:var(--sidebar-background-color-hover);}.source .sidebar>*:not(#sidebar-toggle){opacity:0;visibility:hidden;}.source-sidebar-expanded .source .sidebar{overflow-y:auto;}.source-sidebar-expanded .source .sidebar>*:not(#sidebar-toggle){opacity:1;visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;scrollbar-color:var(--scrollbar-color);}.sidebar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-color);}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;background-color:var(--scrollbar-track-background-color);}.sidebar::-webkit-scrollbar-track{background-color:var(--scrollbar-track-background-color);}::-webkit-scrollbar-thumb,.sidebar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-background-color);}.hidden{display:none !important;}.sidebar .logo-container{display:flex;margin-top:10px;margin-bottom:10px;justify-content:center;}.version{overflow-wrap:break-word;}.logo-container>img{height:100px;width:100px;}.location:empty{border:none;}.location a:first-of-type{font-weight:500;}.block{padding:0;}.block ul,.block li{padding:0;margin:0;list-style:none;}.block a,h2.location a{display:block;padding:0.25rem;margin-left:-0.25rem;text-overflow:ellipsis;overflow:hidden;}.sidebar h2{border-bottom:none;font-weight:500;padding:0;margin:0;margin-top:0.7rem;margin-bottom:0.7rem;}.sidebar h3{font-size:1.125rem;font-weight:500;padding:0;margin:0;}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;}.mobile-topbar{display:none;}.source .content pre.rust{white-space:pre;overflow:auto;padding-left:0;}.rustdoc .example-wrap{display:inline-flex;margin-bottom:10px;}.example-wrap{position:relative;width:100%;}.example-wrap>pre.line-number{overflow:initial;border:1px solid;padding:13px 8px;text-align:right;border-top-left-radius:5px;border-bottom-left-radius:5px;}.example-wrap>pre.rust a:hover{text-decoration:underline;}.line-numbers{text-align:right;}.rustdoc:not(.source) .example-wrap>pre:not(.line-number){width:100%;overflow-x:auto;}.rustdoc:not(.source) .example-wrap>pre.line-numbers{width:auto;overflow-x:visible;}.rustdoc .example-wrap>pre{margin:0;}#search{position:relative;}.search-loading{text-align:center;}#results>table{width:100%;table-layout:fixed;}.content>.example-wrap pre.line-numbers{position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.line-numbers span{cursor:pointer;}.docblock-short{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock-short p{display:inline;}.docblock-short p{overflow:hidden;text-overflow:ellipsis;margin:0;}.docblock>:not(pre)>code,.docblock-short>:not(pre)>code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25rem;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5,.docblock h6{border-bottom-color:var(--headings-border-bottom-color);}.docblock{margin-left:24px;position:relative;}.docblock>:not(.information):not(.more-examples-toggle){max-width:100%;overflow-x:auto;}.content .out-of-band{flex-grow:0;font-size:1.125rem;font-weight:normal;float:right;}.method>.code-header,.trait-impl>.code-header{max-width:calc(100% - 41px);display:block;}.content .in-band{flex-grow:1;margin:0px;padding:0px;overflow-wrap:break-word;overflow-wrap:anywhere;}.in-band>code,.in-band>.code-header{display:inline-block;}.docblock code,.docblock-short code,pre,.rustdoc.source .example-wrap{background-color:var(--code-block-background-color);}#main-content{position:relative;}#main-content>.since{top:inherit;}.content table:not(.table-display){border-spacing:0 5px;}.content td{vertical-align:top;}.content td:first-child{padding-right:20px;}.content td p:first-child{margin-top:0;}.content td h1,.content td h2{margin-left:0;font-size:1.125rem;}.content tr:first-child td{border-top:0;}.docblock table{margin:.5em 0;width:calc(100% - 2px);overflow-x:auto;display:block;}.docblock table td{padding:.5em;border:1px dashed;}.docblock table th{padding:.5em;text-align:left;border:1px solid;}.fields+table{margin-bottom:1em;}.content .item-list{list-style-type:none;padding:0;}.content .multi-column{-moz-column-count:5;-moz-column-gap:2.5em;-webkit-column-count:5;-webkit-column-gap:2.5em;column-count:5;column-gap:2.5em;}.content .multi-column li{width:100%;display:inline-block;}.content>.methods>.method{font-size:1rem;position:relative;}.content .method .where,.content .fn .where,.content .where.fmt-newline{display:block;font-size:0.875rem;}.content .methods>div:not(.notable-traits):not(.method){margin-left:40px;margin-bottom:15px;}.content .docblock>.impl-items{margin-left:20px;margin-top:-34px;}.content .docblock>.impl-items .table-display{margin:0;}.content .docblock>.impl-items table td{padding:0;}.content .docblock>.impl-items .table-display,.impl-items table td{border:none;}.item-info{display:block;}.content .item-info code{font-size:0.875rem;}.content .item-info{position:relative;margin-left:24px;}.sub-variant>div>.item-info{margin-top:initial;}.content .impl-items .docblock,.content .impl-items .item-info{margin-bottom:.6em;}.content .impl-items>.item-info{margin-left:40px;}.methods>.item-info,.content .impl-items>.item-info{margin-top:-8px;}.impl-items{flex-basis:100%;}#main-content>.item-info{margin-top:0;margin-left:0;}nav.sub{flex-grow:1;margin-bottom:25px;}.source nav.sub{margin-left:32px;}nav.main{padding:20px 0;text-align:center;}nav.main .current{border-top:1px solid;border-bottom:1px solid;}nav.main .separator{border:1px solid;display:inline-block;height:23px;margin:0 20px;}nav.sum{text-align:right;}nav.sub form{display:inline;}a{text-decoration:none;background:transparent;}.small-section-header{display:flex;justify-content:space-between;position:relative;}.small-section-header:hover>.anchor{display:initial;}.in-band:hover>.anchor,.impl:hover>.anchor,.method.trait-impl:hover>.anchor,.type.trait-impl:hover>.anchor,.associatedconstant.trait-impl:hover>.anchor,.associatedtype.trait-impl:hover>.anchor{display:inline-block;position:absolute;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.small-section-header>.anchor{left:-15px;padding-right:8px;}h2.small-section-header>.anchor{padding-right:6px;}.anchor::before{content:'§';}.docblock a:not(.srclink):not(.test-arrow):not(.scrape-help):hover,.docblock-short a:not(.srclink):not(.test-arrow):not(.scrape-help):hover,.item-info a{text-decoration:underline;}.block a.current.crate{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{display:table;}.item-row{display:table-row;}.item-left,.item-right{display:table-cell;}.item-left{padding-right:1.25rem;}.search-container{position:relative;display:flex;height:34px;}.search-container>*{height:100%;}.search-results-title{display:inline;}#search-settings{font-size:1.5rem;font-weight:500;margin-bottom:20px;}#crate-search{min-width:115px;margin-top:5px;padding-left:0.15em;padding-right:23px;border:1px solid;border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;background-repeat:no-repeat;background-color:transparent;background-size:20px;background-position:calc(100% - 1px) 56%;background-image:url("down-arrow.svg");max-width:100%;text-overflow:ellipsis;}.search-container{margin-top:4px;}.search-input{-webkit-appearance:none;-moz-box-sizing:border-box !important;box-sizing:border-box !important;outline:none;border:1px solid;border-radius:2px;padding:8px;font-size:1rem;width:100%;}.search-results{display:none;padding-bottom:2em;}.search-results.active{display:block;clear:both;}.search-results .desc>span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block;}.search-results>a{display:block;width:100%;margin-left:2px;margin-right:2px;border-bottom:1px solid #aaa3;}.search-results>a>div{display:flex;flex-flow:row wrap;}.search-results .result-name,.search-results div.desc,.search-results .result-description{width:50%;}.search-results .result-name{padding-right:1em;}.search-results .result-name>span{display:inline-block;margin:0;font-weight:normal;}.popover{font-size:1rem;position:absolute;right:0;z-index:2;display:block;margin-top:7px;border-radius:3px;border:1px solid;font-size:1rem;}.popover::before{content:'';position:absolute;right:11px;border:solid;border-width:1px 1px 0 0;display:inline-block;padding:4px;transform:rotate(-45deg);top:-5px;}.popover,.popover::before{background-color:var(--main-background-color);color:var(--main-color);}#help-button .popover{max-width:600px;}#help-button .popover::before{right:48px;}#help-button dt{float:left;clear:left;display:block;margin-right:0.5rem;}#help-button span.top,#help-button span.bottom{text-align:center;display:block;font-size:1.125rem;}#help-button span.top{text-align:center;display:block;margin:10px 0;border-bottom:1px solid;padding-bottom:4px;margin-bottom:6px;}#help-button span.bottom{clear:both;border-top:1px solid;}.side-by-side{text-align:initial;}.side-by-side>div{width:50%;float:left;padding:0 20px 20px 17px;}.item-info .stab{width:fit-content;min-height:36px;display:flex;align-items:center;white-space:pre-wrap;}.stab{padding:3px;margin-bottom:5px;font-size:0.875rem;font-weight:normal;}.stab p{display:inline;margin:0;}.stab .emoji{font-size:1.25rem;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.module-item .stab,.import-item .stab{border-radius:3px;display:inline-block;font-size:0.875rem;line-height:1.2;margin-bottom:0;margin-left:0.3125em;padding:2px;vertical-align:text-bottom;}.module-item.unstable,.import-item.unstable{opacity:0.65;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;padding-right:2px;position:initial;}.impl-items .srclink,.impl .srclink,.methods .srclink{font-weight:normal;font-size:1rem;}.rightside{float:right;}.variants_table{width:100%;}.variants_table tbody tr td:first-child{width:1%;}td.summary-column{width:100%;}.summary{padding-right:0px;}pre.rust .question-mark{font-weight:bold;}a.test-arrow{display:inline-block;visibility:hidden;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:1.375rem;top:5px;right:5px;z-index:1;}.example-wrap:hover .test-arrow{visibility:visible;}a.test-arrow:hover{text-decoration:none;}.code-attribute{font-weight:300;}.item-spacer{width:100%;height:12px;}.out-of-band>span.since{position:initial;font-size:1.25rem;}h3.variant{font-weight:600;font-size:1.125rem;margin-bottom:10px;border-bottom:none;}.sub-variant h4{font-size:1rem;font-weight:400;border-bottom:none;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}.toggle-label{display:inline-block;margin-left:4px;margin-top:3px;}:target>code,:target>.code-header{opacity:1;}:target{padding-right:3px;}.information{position:absolute;left:-25px;margin-top:7px;z-index:1;}.tooltip{position:relative;display:inline-block;cursor:pointer;}.tooltip::after{display:none;text-align:center;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;font-size:1rem;}.tooltip.ignore::after{content:"This example is not tested";}.tooltip.compile_fail::after{content:"This example deliberately fails to compile";}.tooltip.should_panic::after{content:"This example panics";}.tooltip.edition::after{content:"This code runs with edition " attr(data-edition);}.tooltip::before{content:" ";position:absolute;top:50%;left:16px;margin-top:-5px;border-width:5px;border-style:solid;display:none;}.tooltip:hover::before,.tooltip:hover::after{display:inline;}.tooltip.compile_fail,.tooltip.should_panic,.tooltip.ignore{font-weight:bold;font-size:1.25rem;}.notable-traits-tooltip{display:inline-block;cursor:pointer;}.notable-traits:hover .notable-traits-tooltiptext,.notable-traits .notable-traits-tooltiptext.force-tooltip{display:inline-block;}.notable-traits .notable-traits-tooltiptext{display:none;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;z-index:10;font-size:1rem;cursor:default;position:absolute;border:1px solid;}.notable-traits-tooltip::after{content:"\00a0\00a0\00a0";}.notable-traits .notable,.notable-traits .docblock{margin:0;}.notable-traits .notable{margin:0;margin-bottom:13px;font-size:1.1875rem;font-weight:600;display:block;}.notable-traits .docblock code.content{margin:0;padding:0;font-size:1.25rem;}pre.rust.rust-example-rendered{position:relative;}pre.rust{tab-size:4;-moz-tab-size:4;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#titles{height:35px;}#titles>button{float:left;width:33.3%;text-align:center;font-size:1.125rem;cursor:pointer;border:0;border-top:2px solid;}#titles>button:first-child:last-child{margin-right:1px;width:calc(100% - 1px);}#titles>button:not(:last-child){margin-right:1px;width:calc(33.3% - 1px);}#titles>button>div.count{display:inline-block;font-size:1rem;}.notable-traits{cursor:pointer;z-index:2;margin-left:5px;}#sidebar-toggle{position:sticky;top:0;left:0;font-weight:bold;font-size:1.25rem;border-bottom:1px solid;display:flex;height:40px;justify-content:center;align-items:center;z-index:10;}#source-sidebar{width:100%;z-index:1;overflow:auto;}#source-sidebar>.title{font-size:1.5rem;text-align:center;border-bottom:1px solid;margin-bottom:6px;}#sidebar-toggle>button{background:none;color:inherit;cursor:pointer;text-align:center;border:none;outline:none;position:absolute;top:0;bottom:0;left:0;right:0;width:100%;-webkit-appearance:none;opacity:1;}#settings-menu,#help-button{margin-left:4px;outline:none;}#copy-path{height:34px;}#settings-menu>a,#help-button>button,#copy-path{padding:5px;width:33px;border:1px solid;border-radius:2px;cursor:pointer;}#settings-menu{padding:0;}#settings-menu>a,#help-button>button{padding:5px;height:100%;display:block;}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}#settings-menu.rotate>a img{animation:rotating 2s linear infinite;}.setting-line .radio-line input:checked{box-shadow:inset 0 0 0 3px var(--main-background-color);background-color:var(--settings-input-color);}.setting-line .radio-line input:focus{box-shadow:0 0 1px 1px var(--settings-input-color);}.setting-line .radio-line input:checked:focus{box-shadow:inset 0 0 0 3px var(--main-background-color),0 0 2px 2px var(--settings-input-color);}.setting-line .radio-line input:hover{border-color:var(--settings-input-color) !important;}input:checked+.slider{background-color:var(--settings-input-color);}#help-button>button{text-align:center;font-size:20px;padding-top:2px;}#copy-path{background:initial;margin-left:10px;padding:0;padding-left:2px;border:0;}#theme-choices{display:none;position:absolute;left:0;top:28px;border:1px solid;border-radius:3px;z-index:1;cursor:pointer;}#theme-choices>button{border:none;width:100%;padding:4px 8px;text-align:center;background:rgba(0,0,0,0);overflow-wrap:normal;}#theme-choices>button:not(:first-child){border-top:1px solid;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px;border-radius:3px;cursor:default;}.hidden-by-impl-hider,.hidden-by-usual-hider{display:none !important;}#implementations-list>h3>span.in-band{width:100%;}.table-display{width:100%;border:0;border-collapse:collapse;border-spacing:0;font-size:1rem;}.table-display tr td:first-child{padding-right:0;}.table-display tr td:last-child{float:right;}.table-display .out-of-band{position:relative;font-size:1.125rem;display:block;}.table-display td:hover .anchor{display:block;top:2px;left:-5px;}#main-content>ul{padding-left:10px;}#main-content>ul>li{list-style:none;}.non-exhaustive{margin-bottom:1em;}details.dir-entry{padding-left:4px;}details.dir-entry>summary{margin:0 0 0 13px;list-style-position:outside;cursor:pointer;}details.dir-entry div.folders,details.dir-entry div.files{padding-left:23px;}details.dir-entry a{display:block;}details.rustdoc-toggle>summary.hideme{cursor:pointer;}details.rustdoc-toggle>summary{list-style:none;}details.rustdoc-toggle>summary::-webkit-details-marker,details.rustdoc-toggle>summary::marker{display:none;}details.rustdoc-toggle>summary.hideme>span{margin-left:9px;}details.rustdoc-toggle>summary::before{content:"";cursor:pointer;width:16px;height:16px;background-repeat:no-repeat;background-position:top left;display:inline-block;vertical-align:middle;opacity:.5;}details.rustdoc-toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.rustdoc-toggle>summary.hideme::after{content:"";}details.rustdoc-toggle>summary:focus::before,details.rustdoc-toggle>summary:hover::before{opacity:1;}details.rustdoc-toggle.top-doc>summary,details.rustdoc-toggle.top-doc>summary::before,details.rustdoc-toggle.non-exhaustive>summary,details.rustdoc-toggle.non-exhaustive>summary::before{font-size:1rem;}details.non-exhaustive{margin-bottom:8px;}details.rustdoc-toggle>summary.hideme::before{position:relative;}details.rustdoc-toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.rustdoc-toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}details.rustdoc-toggle[open] >summary.hideme{position:absolute;}details.rustdoc-toggle{position:relative;}details.rustdoc-toggle[open] >summary.hideme>span{display:none;}details.rustdoc-toggle[open] >summary::before,details.rustdoc-toggle[open] >summary.hideme::before{background-image:url("toggle-minus.svg");}details.rustdoc-toggle>summary::before{background-image:url("toggle-plus.svg");}details.rustdoc-toggle[open] >summary::before,details.rustdoc-toggle[open] >summary.hideme::before{width:16px;height:16px;background-repeat:no-repeat;background-position:top left;display:inline-block;content:"";}details.rustdoc-toggle[open] >summary::after,details.rustdoc-toggle[open] >summary.hideme::after{content:"Collapse";}.docblock summary>*{display:inline-block;}@media (min-width:701px){.docblock>.information:first-child>.tooltip{margin-top:16px;}.source-sidebar-expanded .source .sidebar+main .width-limiter .sub-logo-container.rust-logo{display:none;}.source-sidebar-expanded .source .sidebar{width:300px;}}@media (max-width:700px){*[id]{scroll-margin-top:45px;}.rustdoc{padding-top:0px;display:block;}main{padding-left:15px;padding-top:0px;}.rustdoc,.main-heading{flex-direction:column;}.content .out-of-band{text-align:left;margin-left:initial;padding:initial;}.content .out-of-band .since::before{content:"Since ";}#copy-path{display:none;}.sidebar .sidebar-logo,.sidebar .location{display:none;}.sidebar-elems{margin-top:1em;}.sidebar{position:fixed;top:45px;left:-1000px;margin-left:0;margin:0;padding:0;z-index:11;height:calc(100vh - 45px);}.source main,.rustdoc.source .sidebar{top:0;padding:0;height:100vh;border:0;}.sidebar.shown,.source-sidebar-expanded .source .sidebar,.sidebar:focus-within{left:0;}.rustdoc.source>.sidebar{position:fixed;margin:0;z-index:11;width:0;}.mobile-topbar .location a{padding:0;margin:0;}.mobile-topbar .location{border:none;padding:0;margin:auto 0.5em auto auto;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:24px;}.mobile-topbar .logo-container{max-height:45px;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin-left:20px;margin-top:5px;margin-bottom:5px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.source .mobile-topbar{display:none;}.sidebar-menu-toggle{width:45px;font-size:32px;border:none;}.sidebar-elems{background-color:var(--sidebar-background-color);}.source nav:not(.sidebar).sub{margin-left:32px;}.content{margin-left:0px;}.source .content{margin-top:10px;}#search{margin-left:0;padding:0;}.anchor{display:none !important;}.notable-traits{position:absolute;left:-22px;top:24px;}#titles>button>div.count{float:left;width:100%;}#titles{height:50px;}#sidebar-filler{position:fixed;left:45px;width:calc(100% - 45px);top:0;height:45px;z-index:-1;border-bottom:1px solid;}#main-content>details.rustdoc-toggle>summary::before,#main-content>div>details.rustdoc-toggle>summary::before{left:-11px;}#sidebar-toggle{position:fixed;left:1px;top:100px;width:30px;font-size:1.5rem;text-align:center;padding:0;z-index:10;border-top-right-radius:3px;border-bottom-right-radius:3px;cursor:pointer;font-weight:bold;border:1px solid;border-left:0;}.source-sidebar-expanded #sidebar-toggle{left:unset;top:unset;width:unset;border-top-right-radius:unset;border-bottom-right-radius:unset;position:sticky;border:0;border-bottom:1px solid;}#source-sidebar{z-index:11;}#main-content>.line-numbers{margin-top:0;}.notable-traits .notable-traits-tooltiptext{left:0;top:100%;}#help-button{display:none;}.item-table{display:block;}.item-row{display:flex;flex-flow:column wrap;}.item-left,.item-right{width:100%;}.search-results>a{border-bottom:1px solid #aaa9;padding:5px 0px;}.search-results .result-name,.search-results div.desc,.search-results .result-description{width:100%;}.search-results div.desc,.search-results .result-description,.item-right{padding-left:2em;}.source-sidebar-expanded .source .sidebar{max-width:100vw;width:100vw;}details.rustdoc-toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.rustdoc-toggle>summary:not(.hideme)::before,#main-content>details.rustdoc-toggle:not(.top-doc)>summary::before,#main-content>div>details.rustdoc-toggle>summary::before{left:-11px;}}@media print{nav.sidebar,nav.sub,.content .out-of-band,a.srclink,#copy-path,details.rustdoc-toggle[open] >summary::before,details.rustdoc-toggle>summary::before,details.rustdoc-toggle.top-doc>summary{display:none;}.docblock{margin-left:0;}main{padding:10px;}}@media (max-width:464px){#titles,#titles>button{height:73px;}#main-content>table:not(.table-display) td{word-break:break-word;width:50%;}#crate-search{border-radius:4px;}.docblock{margin-left:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}.sub-container{flex-direction:column;}.sub-logo-container{align-self:center;}.source .sub-logo-container>img{height:35px;width:35px;}#sidebar-toggle{top:10px;}.source-sidebar-expanded #sidebar-toggle{top:unset;}}.method-toggle summary,.implementors-toggle summary,.impl{margin-bottom:0.75em;}.method-toggle[open]{margin-bottom:2em;}.implementors-toggle[open]{margin-bottom:2em;}#trait-implementations-list .method-toggle,#synthetic-implementations-list .method-toggle,#blanket-implementations-list .method-toggle{margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;background:transparent;border-width:1px;border-style:solid;border-radius:50px;}.scraped-example .code-wrapper{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;}.scraped-example:not(.expanded) .code-wrapper{max-height:240px;}.scraped-example:not(.expanded) .code-wrapper pre{overflow-y:hidden;max-height:240px;padding-bottom:0;}.scraped-example:not(.expanded) .code-wrapper pre.line-numbers{overflow-x:hidden;}.scraped-example .code-wrapper .prev{position:absolute;top:0.25em;right:2.25em;z-index:100;cursor:pointer;}.scraped-example .code-wrapper .next{position:absolute;top:0.25em;right:1.25em;z-index:100;cursor:pointer;}.scraped-example .code-wrapper .expand{position:absolute;top:0.25em;right:0.25em;z-index:100;cursor:pointer;}.scraped-example:not(.expanded) .code-wrapper:before{content:" ";width:100%;height:5px;position:absolute;z-index:100;top:0;}.scraped-example:not(.expanded) .code-wrapper:after{content:" ";width:100%;height:5px;position:absolute;z-index:100;bottom:0;}.scraped-example .code-wrapper .line-numbers{margin:0;padding:14px 0;}.scraped-example .code-wrapper .line-numbers span{padding:0 14px;}.scraped-example .code-wrapper .example-wrap{flex:1;overflow-x:auto;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded) .code-wrapper .example-wrap{overflow-x:hidden;}.scraped-example .code-wrapper .example-wrap pre.rust{overflow-x:inherit;width:inherit;overflow-y:hidden;}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;margin-bottom:5px;cursor:pointer;}.more-scraped-examples{margin-left:5px;display:flex;flex-direction:row;}.more-scraped-examples-inner{width:calc(100% - 20px);}.toggle-line{align-self:stretch;margin-right:10px;margin-top:5px;padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;}.more-scraped-examples .scraped-example{margin-bottom:20px;}.more-scraped-examples .scraped-example:last-child{margin-bottom:0;}.example-links a{margin-top:20px;}.example-links ul{margin-bottom:0;} \ No newline at end of file diff --git a/ch4/search-index.js b/ch4/search-index.js index 89fc966e..bbd8c947 100644 --- a/ch4/search-index.js +++ b/ch4/search-index.js @@ -1,5 +1,5 @@ var searchIndex = JSON.parse('{\ -"os":{"doc":"The main module and entrypoint","t":[0,5,0,0,0,0,0,14,14,5,0,0,0,0,0,0,17,17,17,17,17,17,8,17,3,17,12,11,11,10,11,5,10,11,10,11,11,11,11,11,11,11,2,17,17,17,2,17,17,17,17,17,5,3,11,11,11,11,5,11,11,11,11,5,5,5,2,2,2,2,2,2,2,2,2,2,0,2,0,0,5,0,0,2,2,12,12,12,12,17,17,3,3,3,3,8,17,6,17,3,3,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,11,11,11,11,11,11,11,11,11,11,11,12,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,3,8,6,3,3,12,10,11,11,11,11,11,11,11,12,10,11,11,11,12,11,5,5,5,11,11,11,11,5,11,11,11,10,11,11,12,12,11,11,11,11,11,11,11,11,11,7,7,5,5,5,13,13,3,3,3,4,3,18,18,18,18,12,11,11,12,11,11,11,11,11,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,5,5,5,11,11,11,5,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,12,11,11,11,11,11,12,11,11,5,11,5,5,11,5,5,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,18,18,18,3,3,3,18,18,18,18,18,11,11,11,11,11,11,12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,11,11,11,11,11,11,11,5,11,11,11,11,11,11,11,11,11,11,11,11,17,17,5,5,5,5,2,0,3,11,11,11,11,12,11,11,11,11,11,17,17,17,17,0,0,5,17,5,5,5,5,3,3,3,3,12,11,11,11,11,11,11,0,12,5,5,11,5,11,11,11,11,11,11,12,11,11,11,5,11,5,11,12,12,5,11,5,11,12,12,5,0,0,12,11,11,11,11,11,11,11,11,11,3,11,11,11,11,11,12,12,12,11,11,11,11,5,13,13,13,3,4,12,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,12,12,11,12,11,11,11,11,11,11,17,17,5,5,5,3,0,5,5,12,12,12,5,5,12,5,5,12,5,12,3,11,11,11,11,11,12,12,12,11,12,12,11,11,11,12],"n":["board","clear_bss","config","console","lang_items","loader","mm","print","println","rust_main","sbi","sync","syscall","task","timer","trap","CLOCK_FREQ","EXIT_FAILURE","EXIT_FAILURE_FLAG","EXIT_RESET","EXIT_SUCCESS","MMIO","QEMUExit","QEMU_EXIT_HANDLE","RISCV64","VIRT_TEST","addr","borrow","borrow_mut","exit","exit","exit_code_encode","exit_failure","exit_failure","exit_success","exit_success","from","into","new","try_from","try_into","type_id","CLOCK_FREQ","KERNEL_HEAP_SIZE","KERNEL_STACK_SIZE","MEMORY_END","MMIO","PAGE_SIZE","PAGE_SIZE_BITS","TRAMPOLINE","TRAP_CONTEXT","USER_STACK_SIZE","kernel_stack_position","Stdout","borrow","borrow_mut","from","into","print","try_from","try_into","type_id","write_str","panic","get_app_data","get_num_app","FrameTracker","KERNEL_SPACE","KERNEL_SPACE","MapPermission","MemorySet","PageTableEntry","PhysAddr","PhysPageNum","VirtAddr","VirtPageNum","address","frame_alloc","frame_allocator","heap_allocator","init","memory_set","page_table","remap_test","translated_byte_buffer","0","0","0","0","PA_WIDTH_SV39","PPN_WIDTH_SV39","PhysAddr","PhysPageNum","SimpleRange","SimpleRangeIterator","StepByOne","VA_WIDTH_SV39","VPNRange","VPN_WIDTH_SV39","VirtAddr","VirtPageNum","aligned","aligned","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","ceil","ceil","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","cmp","cmp","cmp","cmp","current","end","eq","eq","eq","eq","floor","floor","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","get_bytes_array","get_end","get_mut","get_pte_array","get_start","indexes","into","into","into","into","into","into","into_iter","into_iter","l","ne","ne","ne","ne","new","new","next","page_offset","page_offset","partial_cmp","partial_cmp","partial_cmp","partial_cmp","r","step","step","to_owned","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","FRAME_ALLOCATOR","FrameAllocator","FrameAllocatorImpl","FrameTracker","StackFrameAllocator","__private_field","alloc","alloc","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","current","dealloc","dealloc","deref","drop","end","fmt","frame_alloc","frame_allocator_test","frame_dealloc","from","from","from","init","init_frame_allocator","into","into","into","new","new","new","ppn","recycled","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","HEAP_ALLOCATOR","HEAP_SPACE","handle_alloc_error","heap_test","init_heap","Framed","Identical","KERNEL_SPACE","MapArea","MapPermission","MapType","MemorySet","R","U","W","X","__private_field","activate","all","areas","bitand","bitand_assign","bitor","bitor_assign","bits","bits","bitxor","bitxor_assign","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","cmp","complement","contains","copy_data","data_frames","deref","difference","ebss","edata","ekernel","empty","eq","eq","erodata","etext","extend","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from_bits","from_bits_truncate","from_bits_unchecked","from_elf","from_iter","hash","insert","insert_framed_area","intersection","intersects","into","into","into","into","into","is_all","is_empty","map","map_one","map_perm","map_trampoline","map_type","ne","new","new_bare","new_kernel","not","page_table","partial_cmp","push","remap_test","remove","sbss_with_stack","sdata","set","srodata","stext","strampoline","sub","sub_assign","symmetric_difference","to_owned","to_owned","toggle","token","translate","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","union","unmap","unmap_one","vpn_range","A","D","G","PTEFlags","PageTable","PageTableEntry","R","U","V","W","X","all","bitand","bitand_assign","bitor","bitor_assign","bits","bits","bits","bitxor","bitxor_assign","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","cmp","complement","contains","difference","empty","empty","eq","executable","extend","find_pte","find_pte_create","flags","fmt","fmt","fmt","fmt","fmt","frames","from","from","from","from_bits","from_bits_truncate","from_bits_unchecked","from_iter","from_token","hash","insert","intersection","intersects","into","into","into","is_all","is_empty","is_valid","map","ne","new","new","not","partial_cmp","ppn","readable","remove","root_ppn","set","sub","sub_assign","symmetric_difference","to_owned","to_owned","toggle","token","translate","translated_byte_buffer","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","union","unmap","writable","SBI_CONSOLE_PUTCHAR","SBI_SET_TIMER","console_putchar","sbi_call","set_timer","shutdown","UPSafeCell","up","UPSafeCell","borrow","borrow_mut","exclusive_access","from","inner","into","new","try_from","try_into","type_id","SYSCALL_EXIT","SYSCALL_GET_TIME","SYSCALL_WRITE","SYSCALL_YIELD","fs","process","syscall","FD_STDOUT","sys_write","sys_exit","sys_get_time","sys_yield","TASK_MANAGER","TaskContext","TaskManager","TaskManagerInner","__private_field","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","context","current_task","current_trap_cx","current_user_token","deref","exit_current_and_run_next","find_next_task","from","from","from","get_current_token","get_current_trap_cx","inner","into","into","into","mark_current_exited","mark_current_exited","mark_current_suspended","mark_current_suspended","num_app","ra","run_first_task","run_first_task","run_next_task","run_next_task","s","sp","suspend_current_and_run_next","switch","task","tasks","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","TaskContext","borrow","borrow_mut","from","goto_trap_return","into","ra","s","sp","try_from","try_into","type_id","zero_init","__switch","Exited","Ready","Running","TaskControlBlock","TaskStatus","base_size","borrow","borrow","borrow_mut","borrow_mut","clone","clone_into","eq","from","from","get_trap_cx","get_user_token","into","into","memory_set","new","task_cx","task_status","to_owned","trap_cx_ppn","try_from","try_from","try_into","try_into","type_id","type_id","MSEC_PER_SEC","TICKS_PER_SEC","get_time","get_time_ms","set_next_trigger","TrapContext","context","enable_timer_interrupt","init","kernel_satp","kernel_sp","sepc","set_kernel_trap_entry","set_user_trap_entry","sstatus","trap_from_kernel","trap_handler","trap_handler","trap_return","x","TrapContext","app_init_context","borrow","borrow_mut","from","into","kernel_satp","kernel_sp","sepc","set_sp","sstatus","trap_handler","try_from","try_into","type_id","x"],"q":["os","","","","","","","","","","","","","","","","os::board","","","","","","","","","","","","","","","","","","","","","","","","","","os::config","","","","","","","","","","","os::console","","","","","","","","","","os::lang_items","os::loader","","os::mm","","","","","","","","","","","","","","","","","","","os::mm::address","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","os::mm::frame_allocator","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","os::mm::heap_allocator","","","","","os::mm::memory_set","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","os::mm::page_table","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","os::sbi","","","","","","os::sync","","os::sync::up","","","","","","","","","","","os::syscall","","","","","","","os::syscall::fs","","os::syscall::process","","","os::task","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","os::task::context","","","","","","","","","","","","","os::task::switch","os::task::task","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","os::timer","","","","","os::trap","","","","","","","","","","","","","","","os::trap::context","","","","","","","","","","","","","","",""],"d":["Constants used in rCore for qemu","clear BSS segment","Constants used in rCore","SBI console driver, for text output","The panic handler","Loading user applications into memory","Memory management implementation","print string macro","println string macro","the rust entry-point of os","SBI call wrappers","Synchronization and interior mutability primitives","Implementation of syscalls","Task management implementation","RISC-V timer-related functionality","Trap handling functionality","","","","","","","","","RISCV64 configuration","","Address of the sifive_test mapped device.","","","Exit with specified return code.","Exit qemu with specified exit code.","Encode the exit code using EXIT_FAILURE_FLAG.","Exit QEMU using EXIT_FAILURE, aka 1.","","Exit QEMU using EXIT_SUCCESS, aka 0, if possible.","","Returns the argument unchanged.","Calls U::from(self).","Create an instance.","","","","","","","","","","","","","","Return (bottom, top) of a kernel stack in kernel space.","","","","Returns the argument unchanged.","Calls U::from(self).","","","","","","panic handler","get applications data","Get the total number of applications.","","","","","","","","","","","Implementation of physical and virtual address and page …","","Implementation of FrameAllocator which controls all the …","The global allocator","initiate heap allocator, frame allocator and kernel space","Implementation of MapArea and MemorySet.","Implementation of PageTableEntry and PageTable.","","","","","","","physical address","","Definitions","physical page number","a simple range structure for type T","iterator for the simple range structure","","","a simple range structure for virtual page number","","virtual address","virtual page number","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","","","Returns the argument unchanged.","","","Returns the argument unchanged.","Returns the argument unchanged.","","","","Returns the argument unchanged.","","Returns the argument unchanged.","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","frame allocator instance through lazy_static!","","","manage a frame which has the same lifecycle as the tracker","an implementation for frame allocator","","","","","","","","","","","","","","","","","allocate a frame","a simple test for frame allocator","deallocate a frame","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","initiate the frame allocator using ekernel and MEMORY_END","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","heap allocator instance","heap space ([u8; KERNEL_HEAP_SIZE])","panic when heap allocation error occurs","","initiate heap allocator","","","a memory set instance through lazy_static! managing kernel …","map area structure, controls a contiguous piece of virtual …","map permission corresponding to that in pte: R W X U","map type for memory set: identical or framed","memory set structure, controls virtual-memory space","","","","","","","Returns the set containing all flags.","","Returns the intersection between the two sets of flags.","Disables all flags disabled in the set.","Returns the union of the two sets of flags.","Adds the set of flags.","Returns the raw value of the flags currently stored.","","Returns the left flags, but with all the right flags …","Toggles the set of flags.","","","","","","","","","","","","","","","","Returns the complement of this set of flags.","Returns true if all of the flags in other are contained …","data: start-aligned but maybe with shorter length assume …","","","Returns the difference between the flags in self and other.","","","","Returns an empty set of flags.","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Convert from underlying bit representation, unless that …","Convert from underlying bit representation, dropping any …","Convert from underlying bit representation, preserving all …","Include sections in elf and trampoline and TrapContext and …","","","Inserts the specified flags in-place.","Assume that no conflicts.","Returns the intersection between the flags in self and …","Returns true if there are flags common to both self and …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns true if all flags are currently set.","Returns true if no flags are currently stored.","","","","Mention that trampoline is not collected by areas.","","","","","Without kernel stacks.","Returns the complement of this set of flags.","","","","","Removes the specified flags in-place.","","","Inserts or removes the specified flags depending on the …","","","","Returns the set difference of the two sets of flags.","Disables all flags enabled in the set.","Returns the symmetric difference between the flags in self …","","","Toggles the specified flags in-place.","","","","","","","","","","","","","","","","","","Returns the union of between the flags in self and other.","","","","","","","page table entry flags","page table structure","page table entry structure","","","","","","Returns the set containing all flags.","Returns the intersection between the two sets of flags.","Disables all flags disabled in the set.","Returns the union of the two sets of flags.","Adds the set of flags.","Returns the raw value of the flags currently stored.","","","Returns the left flags, but with all the right flags …","Toggles the set of flags.","","","","","","","","","","","","Returns the complement of this set of flags.","Returns true if all of the flags in other are contained …","Returns the difference between the flags in self and other.","Returns an empty set of flags.","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Convert from underlying bit representation, unless that …","Convert from underlying bit representation, dropping any …","Convert from underlying bit representation, preserving all …","","Temporarily used to get arguments from user space.","","Inserts the specified flags in-place.","Returns the intersection between the flags in self and …","Returns true if there are flags common to both self and …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns true if all flags are currently set.","Returns true if no flags are currently stored.","","","","","","Returns the complement of this set of flags.","","","","Removes the specified flags in-place.","","Inserts or removes the specified flags depending on the …","Returns the set difference of the two sets of flags.","Disables all flags enabled in the set.","Returns the symmetric difference between the flags in self …","","","Toggles the specified flags in-place.","","","translate a pointer to a mutable u8 Vec through page table","","","","","","","","","","Returns the union of between the flags in self and other.","","","","","use sbi call to putchar in console (qemu uart handler)","general sbi call","use sbi call to set timer","use sbi call to shutdown the kernel","","Uniprocessor interior mutability primitives","Wrap a static data structure inside it so that we are able …","","","Exclusive access inner data in UPSafeCell. Panic if the …","Returns the argument unchanged.","inner data","Calls U::from(self).","User is responsible to guarantee that inner struct is only …","","","","","","","","File and filesystem-related syscalls","Process management syscalls","handle syscall exception with syscall_id and other …","","write buf of length len to a file with fd","task exits and submit an exit code","get current time","current task gives up resources for other tasks","a TaskManager global instance through lazy_static!","task context structure containing some registers","The task manager, where all the tasks are managed.","The task manager inner in ‘UPSafeCell’","","","","","","","","Implementation of TaskContext","id of current Running task","Get the current ‘Running’ task’s trap contexts.","Get the current ‘Running’ task’s token.","","Exit the current ‘Running’ task and run the next task …","Find next task to run and return task id.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Get the current ‘Running’ task’s token.","Get the current ‘Running’ task’s trap contexts.","use inner value to get mutable access","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Change the status of current Running task into Exited.","Change the status of current Running task into Exited.","Change the status of current Running task into Ready.","Change the status of current Running task into Ready.","total number of tasks","return address ( e.g. __restore ) of __switch ASM function","Run the first task in task list.","Run the first task in task list.","Switch current Running task to the task we have found, or …","Switch current Running task to the task we have found, or …","callee saved registers: s 0..11","kernel stack pointer of app","Suspend the current ‘Running’ task and run the next …","Rust wrapper around __switch.","Types related to task management","task list","","","","","","","","","","task context structure containing some registers","","","Returns the argument unchanged.","set Task Context{__restore ASM funciton: trap_return, sp: …","Calls U::from(self).","return address ( e.g. __restore ) of __switch ASM function","callee saved registers: s 0..11","kernel stack pointer of app","","","","init task context","Switch to the context of next_task_cx_ptr, saving the …","","","","task control block structure","task status: UnInit, Ready, Running, Exited","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","get current time in microseconds","set the next timer interrupt","trap context structure containing sstatus, sepc and …","Implementation of TrapContext","enable timer interrupt in sie CSR","initialize CSR stvec as the entry of __alltraps","Addr of Page Table","kernel stack","CSR sepc","","","CSR sstatus ","Unimplement: traps/interrupts/exceptions from kernel mode …","handle an interrupt, exception, or system call from user …","Addr of trap_handler function","set the new addr of __restore asm function in TRAMPOLINE …","general regs[0..31]","trap context structure containing sstatus, sepc and …","init app context","","","Returns the argument unchanged.","Calls U::from(self).","Addr of Page Table","kernel stack","CSR sepc","set stack pointer to x_2 reg (sp)","CSR sstatus ","Addr of trap_handler function","","","","general regs[0..31]"],"i":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,50,3,0,50,3,50,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,9,9,9,9,0,9,9,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,15,16,17,0,0,0,0,0,0,0,0,0,0,0,0,13,15,22,13,15,16,17,19,22,13,15,16,17,19,13,15,13,15,16,17,19,13,15,16,17,19,13,15,16,17,22,22,13,15,16,17,13,15,13,15,16,17,22,13,13,13,15,15,15,16,16,16,17,17,17,19,16,19,16,16,19,17,22,13,15,16,17,19,22,19,19,13,15,16,17,22,19,22,13,15,13,15,16,17,19,51,17,13,15,16,17,19,22,13,15,16,17,19,22,13,15,16,17,19,22,13,15,16,17,19,0,0,0,0,0,25,52,24,27,24,25,27,24,25,24,52,24,25,27,24,27,0,0,0,27,24,25,24,0,27,24,25,52,27,24,27,24,27,24,25,27,24,25,27,24,25,0,0,0,0,0,32,32,0,0,0,0,0,30,30,30,30,35,29,30,29,30,30,30,30,30,30,30,30,29,33,35,32,30,29,33,35,32,30,32,30,32,30,30,30,30,33,33,35,30,0,0,0,30,32,30,0,0,30,32,30,30,30,30,30,29,33,35,32,30,30,30,30,29,30,30,30,29,30,30,29,33,35,32,30,30,30,33,33,33,29,33,30,33,29,29,30,29,30,29,0,30,0,0,30,0,0,0,30,30,30,32,30,30,29,29,29,33,35,32,30,29,33,35,32,30,29,33,35,32,30,30,33,33,33,39,39,39,0,0,0,39,39,39,39,39,39,39,39,39,39,39,39,38,39,39,34,39,38,34,39,38,39,38,39,38,39,39,39,39,39,38,39,38,39,34,34,38,39,39,39,39,39,34,34,39,38,39,39,39,39,34,39,39,39,39,34,39,38,39,39,38,34,39,34,38,39,39,38,38,39,34,39,39,39,39,39,38,39,34,34,0,34,39,38,34,39,38,34,39,38,39,34,38,0,0,0,0,0,0,0,0,0,26,26,26,26,26,26,26,26,26,26,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,46,53,45,46,53,45,0,53,0,0,45,0,46,46,53,45,46,46,46,46,53,45,0,46,0,46,46,47,0,46,0,46,47,47,0,0,0,53,46,53,45,46,53,45,46,53,45,0,47,47,47,47,47,47,47,47,47,47,47,47,0,48,48,48,0,0,49,49,48,49,48,48,48,48,49,48,49,49,49,48,49,49,49,49,48,49,49,48,49,48,49,48,0,0,0,0,0,0,0,0,0,44,44,44,0,0,44,0,0,44,0,44,0,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44],"f":[0,[[]],0,0,0,0,0,0,0,[[],1],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[]],[[]],[2,1],[[3,2],1],[2,2],[[],1],[3,1],[[],1],[3,1],[[]],[[]],[4,3],[[],5],[[],5],[[],6],0,0,0,0,0,0,0,0,0,0,[7],0,[[]],[[]],[[]],[[]],[8],[[],5],[[],5],[[],6],[[9,10],11],[12,1],[7],[[],7],0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[13,14],[15,14],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[13,16],[15,17],[13,13],[15,15],[16,16],[17,17],[[[19,[18]]],[[19,[18]]]],[[]],[[]],[[]],[[]],[[]],[[13,13],20],[[15,15],20],[[16,16],20],[[17,17],20],0,0,[[13,13],14],[[15,15],14],[[16,16],14],[[17,17],14],[13,16],[15,17],[[13,21],11],[[15,21],11],[[16,21],11],[[17,21],11],[[]],[16,13],[7,13],[[]],[7,15],[17,15],[[]],[[]],[13,16],[7,16],[7,17],[[]],[15,17],[[]],[16],[19],[16],[16],[19],[17],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[19],0,[[13,13],14],[[15,15],14],[[16,16],14],[[17,17],14],[[],22],[[],19],[22,23],[13,7],[15,7],[[13,13],[[23,[20]]]],[[15,15],[[23,[20]]]],[[16,16],[[23,[20]]]],[[17,17],[[23,[20]]]],0,[[]],[17],[[]],[[]],[[]],[[]],[[]],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],6],[[],6],[[],6],[[],6],[[],6],[[],6],0,0,0,0,0,0,[[],[[23,[16]]]],[24,[[23,[16]]]],[[]],[[]],[[]],[[]],[[]],[[]],0,[16],[[24,16]],[25,26],[27],0,[[27,21],11],[[],[[23,[27]]]],[[]],[16],[[]],[[]],[[]],[[24,16,16]],[[]],[[]],[[]],[[]],[[]],[16,27],[[],24],0,0,[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],6],[[],6],[[],6],0,0,[28,1],[[]],[[]],0,0,0,0,0,0,0,0,0,0,0,0,[29],[[],30],0,[[30,30],30],[[30,30]],[[30,30],30],[[30,30]],[30,31],0,[[30,30],30],[[30,30]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[32,32],[30,30],[[]],[[]],[[30,30],20],[30,30],[[30,30],14],[[33,34]],0,[35,36],[[30,30],30],0,0,0,[[],30],[[32,32],14],[[30,30],14],0,0,[[30,37]],[[32,21],11],[[30,21],11],[[30,21],11],[[30,21],11],[[30,21],11],[[30,21],11],[[]],[[]],[[]],[[]],[[]],[31,[[23,[30]]]],[31,30],[31,30],[[]],[37,30],[30],[[30,30]],[[29,15,15,30]],[[30,30],30],[[30,30],14],[[]],[[]],[[]],[[]],[[]],[30,14],[30,14],[[33,34]],[[33,34,17]],0,[29],0,[[30,30],14],[[15,15,32,30],33],[[],29],[[],29],[30,30],0,[[30,30],[[23,[20]]]],[[29,33,23]],[[]],[[30,30]],0,0,[[30,30,14]],0,0,0,[[30,30],30],[[30,30]],[[30,30],30],[[]],[[]],[[30,30]],[29,7],[[29,17],[[23,[38]]]],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],6],[[],6],[[],6],[[],6],[[],6],[[30,30],30],[[33,34]],[[33,34,17]],0,0,0,0,0,0,0,0,0,0,0,0,[[],39],[[39,39],39],[[39,39]],[[39,39],39],[[39,39]],[39,31],0,0,[[39,39],39],[[39,39]],[[]],[[]],[[]],[[]],[[]],[[]],[39,39],[38,38],[[]],[[]],[[39,39],20],[39,39],[[39,39],14],[[39,39],39],[[],39],[[],38],[[39,39],14],[38,14],[[39,37]],[[34,17],[[23,[38]]]],[[34,17],[[23,[38]]]],[38,39],[[39,21],11],[[39,21],11],[[39,21],11],[[39,21],11],[[39,21],11],0,[[]],[[]],[[]],[31,[[23,[39]]]],[31,39],[31,39],[37,39],[7,34],[39],[[39,39]],[[39,39],39],[[39,39],14],[[]],[[]],[[]],[39,14],[39,14],[38,14],[[34,17,16,39]],[[39,39],14],[[],34],[[16,39],38],[39,39],[[39,39],[[23,[20]]]],[38,16],[38,14],[[39,39]],0,[[39,39,14]],[[39,39],39],[[39,39]],[[39,39],39],[[]],[[]],[[39,39]],[34,7],[[34,17],[[23,[38]]]],[[7,31,7],40],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],6],[[],6],[[],6],[[39,39],39],[[34,17]],[38,14],0,0,[7],[[7,7,7,7],7],[7],[[],1],0,0,0,[[]],[[]],[26,41],[[]],0,[[]],[[],26],[[],5],[[],5],[[],6],0,0,0,0,0,0,[7,42],0,[[7,31,7],42],[43,1],[[],42],[[],42],0,0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],0,0,[[],44],[[],7],[45,46],[[]],[46,[[23,[7]]]],[[]],[[]],[[]],[46,7],[46,44],0,[[]],[[]],[[]],[[]],[46],[[]],[46],0,0,[[]],[46,1],[[]],[46],0,0,[[]],0,0,0,[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],6],[[],6],[[],6],0,[[]],[[]],[[]],[7,47],[[]],0,0,0,[[],5],[[],5],[[],6],[[],47],0,0,0,0,0,0,0,[[]],[[]],[[]],[[]],[48,48],[[]],[[48,48],14],[[]],[[]],[49,44],[49,7],[[]],[[]],0,[7,49],0,0,[[]],0,[[],5],[[],5],[[],5],[[],5],[[],6],[[],6],0,0,[[],7],[[],7],[[]],0,0,[[]],[[]],0,0,0,[[]],[[]],0,[[],1],[[],1],0,[[],1],0,0,[[7,7,7,7,7],44],[[]],[[]],[[]],[[]],0,0,0,[[44,7]],0,0,[[],5],[[],5],[[],6],0],"p":[[15,"never"],[15,"u32"],[3,"RISCV64"],[15,"u64"],[4,"Result"],[3,"TypeId"],[15,"usize"],[3,"Arguments"],[3,"Stdout"],[15,"str"],[6,"Result"],[3,"PanicInfo"],[3,"PhysAddr"],[15,"bool"],[3,"VirtAddr"],[3,"PhysPageNum"],[3,"VirtPageNum"],[8,"Clone"],[3,"SimpleRange"],[4,"Ordering"],[3,"Formatter"],[3,"SimpleRangeIterator"],[4,"Option"],[3,"StackFrameAllocator"],[3,"FRAME_ALLOCATOR"],[3,"UPSafeCell"],[3,"FrameTracker"],[3,"Layout"],[3,"MemorySet"],[3,"MapPermission"],[15,"u8"],[4,"MapType"],[3,"MapArea"],[3,"PageTable"],[3,"KERNEL_SPACE"],[3,"Arc"],[8,"IntoIterator"],[3,"PageTableEntry"],[3,"PTEFlags"],[3,"Vec"],[3,"RefMut"],[15,"isize"],[15,"i32"],[3,"TrapContext"],[3,"TASK_MANAGER"],[3,"TaskManager"],[3,"TaskContext"],[4,"TaskStatus"],[3,"TaskControlBlock"],[8,"QEMUExit"],[8,"StepByOne"],[8,"FrameAllocator"],[3,"TaskManagerInner"]]}\ +"os":{"doc":"The main module and entrypoint","t":[0,5,0,0,0,0,0,14,14,5,0,0,0,0,0,0,17,17,17,17,17,17,8,17,3,17,12,11,11,10,11,5,10,11,10,11,11,11,11,11,11,11,2,17,17,17,2,17,17,17,17,17,5,3,11,11,11,11,5,11,11,11,11,5,5,5,2,2,2,2,2,2,2,2,2,2,0,2,0,0,5,0,0,2,2,12,12,12,12,17,17,3,3,3,3,8,17,6,17,3,3,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,11,11,11,11,11,11,11,11,11,11,11,12,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,3,8,6,3,3,12,10,11,11,11,11,11,11,11,12,10,11,11,11,12,11,5,5,5,11,11,11,11,5,11,11,11,10,11,11,12,12,11,11,11,11,11,11,11,11,11,7,7,5,5,5,13,13,3,3,3,4,3,18,18,18,18,12,11,11,12,11,11,11,11,11,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,5,5,5,11,11,11,5,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,12,11,11,11,11,11,12,11,11,5,11,5,5,11,5,5,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,18,18,18,3,3,3,18,18,18,18,18,11,11,11,11,11,11,12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,11,11,11,11,11,11,11,5,11,11,11,11,11,11,11,11,11,11,11,11,17,17,5,5,5,5,2,0,3,11,11,11,11,12,11,11,11,11,11,17,17,17,17,0,0,5,17,5,5,5,5,3,3,3,3,12,11,11,11,11,11,11,0,12,5,5,11,5,11,11,11,11,11,11,12,11,11,11,5,11,5,11,12,12,5,11,5,11,12,12,5,0,0,12,11,11,11,11,11,11,11,11,11,3,11,11,11,11,11,12,12,12,11,11,11,11,5,13,13,13,3,4,12,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,12,12,11,12,11,11,11,11,11,11,17,17,5,5,5,3,0,5,5,12,12,12,5,5,12,5,5,12,5,12,3,11,11,11,11,11,12,12,12,11,12,12,11,11,11,12],"n":["board","clear_bss","config","console","lang_items","loader","mm","print","println","rust_main","sbi","sync","syscall","task","timer","trap","CLOCK_FREQ","EXIT_FAILURE","EXIT_FAILURE_FLAG","EXIT_RESET","EXIT_SUCCESS","MMIO","QEMUExit","QEMU_EXIT_HANDLE","RISCV64","VIRT_TEST","addr","borrow","borrow_mut","exit","exit","exit_code_encode","exit_failure","exit_failure","exit_success","exit_success","from","into","new","try_from","try_into","type_id","CLOCK_FREQ","KERNEL_HEAP_SIZE","KERNEL_STACK_SIZE","MEMORY_END","MMIO","PAGE_SIZE","PAGE_SIZE_BITS","TRAMPOLINE","TRAP_CONTEXT","USER_STACK_SIZE","kernel_stack_position","Stdout","borrow","borrow_mut","from","into","print","try_from","try_into","type_id","write_str","panic","get_app_data","get_num_app","FrameTracker","KERNEL_SPACE","KERNEL_SPACE","MapPermission","MemorySet","PageTableEntry","PhysAddr","PhysPageNum","VirtAddr","VirtPageNum","address","frame_alloc","frame_allocator","heap_allocator","init","memory_set","page_table","remap_test","translated_byte_buffer","0","0","0","0","PA_WIDTH_SV39","PPN_WIDTH_SV39","PhysAddr","PhysPageNum","SimpleRange","SimpleRangeIterator","StepByOne","VA_WIDTH_SV39","VPNRange","VPN_WIDTH_SV39","VirtAddr","VirtPageNum","aligned","aligned","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","ceil","ceil","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","cmp","cmp","cmp","cmp","current","end","eq","eq","eq","eq","floor","floor","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","get_bytes_array","get_end","get_mut","get_pte_array","get_start","indexes","into","into","into","into","into","into","into_iter","into_iter","l","ne","ne","ne","ne","new","new","next","page_offset","page_offset","partial_cmp","partial_cmp","partial_cmp","partial_cmp","r","step","step","to_owned","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","FRAME_ALLOCATOR","FrameAllocator","FrameAllocatorImpl","FrameTracker","StackFrameAllocator","__private_field","alloc","alloc","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","current","dealloc","dealloc","deref","drop","end","fmt","frame_alloc","frame_allocator_test","frame_dealloc","from","from","from","init","init_frame_allocator","into","into","into","new","new","new","ppn","recycled","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","HEAP_ALLOCATOR","HEAP_SPACE","handle_alloc_error","heap_test","init_heap","Framed","Identical","KERNEL_SPACE","MapArea","MapPermission","MapType","MemorySet","R","U","W","X","__private_field","activate","all","areas","bitand","bitand_assign","bitor","bitor_assign","bits","bits","bitxor","bitxor_assign","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","cmp","complement","contains","copy_data","data_frames","deref","difference","ebss","edata","ekernel","empty","eq","eq","erodata","etext","extend","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from_bits","from_bits_truncate","from_bits_unchecked","from_elf","from_iter","hash","insert","insert_framed_area","intersection","intersects","into","into","into","into","into","is_all","is_empty","map","map_one","map_perm","map_trampoline","map_type","ne","new","new_bare","new_kernel","not","page_table","partial_cmp","push","remap_test","remove","sbss_with_stack","sdata","set","srodata","stext","strampoline","sub","sub_assign","symmetric_difference","to_owned","to_owned","toggle","token","translate","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","union","unmap","unmap_one","vpn_range","A","D","G","PTEFlags","PageTable","PageTableEntry","R","U","V","W","X","all","bitand","bitand_assign","bitor","bitor_assign","bits","bits","bits","bitxor","bitxor_assign","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","cmp","complement","contains","difference","empty","empty","eq","executable","extend","find_pte","find_pte_create","flags","fmt","fmt","fmt","fmt","fmt","frames","from","from","from","from_bits","from_bits_truncate","from_bits_unchecked","from_iter","from_token","hash","insert","intersection","intersects","into","into","into","is_all","is_empty","is_valid","map","ne","new","new","not","partial_cmp","ppn","readable","remove","root_ppn","set","sub","sub_assign","symmetric_difference","to_owned","to_owned","toggle","token","translate","translated_byte_buffer","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","union","unmap","writable","SBI_CONSOLE_PUTCHAR","SBI_SET_TIMER","console_putchar","sbi_call","set_timer","shutdown","UPSafeCell","up","UPSafeCell","borrow","borrow_mut","exclusive_access","from","inner","into","new","try_from","try_into","type_id","SYSCALL_EXIT","SYSCALL_GET_TIME","SYSCALL_WRITE","SYSCALL_YIELD","fs","process","syscall","FD_STDOUT","sys_write","sys_exit","sys_get_time","sys_yield","TASK_MANAGER","TaskContext","TaskManager","TaskManagerInner","__private_field","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","context","current_task","current_trap_cx","current_user_token","deref","exit_current_and_run_next","find_next_task","from","from","from","get_current_token","get_current_trap_cx","inner","into","into","into","mark_current_exited","mark_current_exited","mark_current_suspended","mark_current_suspended","num_app","ra","run_first_task","run_first_task","run_next_task","run_next_task","s","sp","suspend_current_and_run_next","switch","task","tasks","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","TaskContext","borrow","borrow_mut","from","goto_trap_return","into","ra","s","sp","try_from","try_into","type_id","zero_init","__switch","Exited","Ready","Running","TaskControlBlock","TaskStatus","base_size","borrow","borrow","borrow_mut","borrow_mut","clone","clone_into","eq","from","from","get_trap_cx","get_user_token","into","into","memory_set","new","task_cx","task_status","to_owned","trap_cx_ppn","try_from","try_from","try_into","try_into","type_id","type_id","MSEC_PER_SEC","TICKS_PER_SEC","get_time","get_time_ms","set_next_trigger","TrapContext","context","enable_timer_interrupt","init","kernel_satp","kernel_sp","sepc","set_kernel_trap_entry","set_user_trap_entry","sstatus","trap_from_kernel","trap_handler","trap_handler","trap_return","x","TrapContext","app_init_context","borrow","borrow_mut","from","into","kernel_satp","kernel_sp","sepc","set_sp","sstatus","trap_handler","try_from","try_into","type_id","x"],"q":["os","","","","","","","","","","","","","","","","os::board","","","","","","","","","","","","","","","","","","","","","","","","","","os::config","","","","","","","","","","","os::console","","","","","","","","","","os::lang_items","os::loader","","os::mm","","","","","","","","","","","","","","","","","","","os::mm::address","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","os::mm::frame_allocator","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","os::mm::heap_allocator","","","","","os::mm::memory_set","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","os::mm::page_table","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","os::sbi","","","","","","os::sync","","os::sync::up","","","","","","","","","","","os::syscall","","","","","","","os::syscall::fs","","os::syscall::process","","","os::task","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","os::task::context","","","","","","","","","","","","","os::task::switch","os::task::task","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","os::timer","","","","","os::trap","","","","","","","","","","","","","","","os::trap::context","","","","","","","","","","","","","","",""],"d":["Constants used in rCore for qemu","clear BSS segment","Constants used in rCore","SBI console driver, for text output","The panic handler","Loading user applications into memory","Memory management implementation","print string macro","println string macro","the rust entry-point of os","SBI call wrappers","Synchronization and interior mutability primitives","Implementation of syscalls","Task management implementation","RISC-V timer-related functionality","Trap handling functionality","","","","","","","","","RISCV64 configuration","","Address of the sifive_test mapped device.","","","Exit with specified return code.","Exit qemu with specified exit code.","Encode the exit code using EXIT_FAILURE_FLAG.","Exit QEMU using EXIT_FAILURE, aka 1.","","Exit QEMU using EXIT_SUCCESS, aka 0, if possible.","","Returns the argument unchanged.","Calls U::from(self).","Create an instance.","","","","","","","","","","","","","","Return (bottom, top) of a kernel stack in kernel space.","","","","Returns the argument unchanged.","Calls U::from(self).","","","","","","panic handler","get applications data","Get the total number of applications.","","","","","","","","","","","Implementation of physical and virtual address and page …","","Implementation of FrameAllocator which controls all the …","The global allocator","initiate heap allocator, frame allocator and kernel space","Implementation of MapArea and MemorySet.","Implementation of PageTableEntry and PageTable.","","","","","","","physical address","","Definitions","physical page number","a simple range structure for type T","iterator for the simple range structure","","","a simple range structure for virtual page number","","virtual address","virtual page number","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","","","Returns the argument unchanged.","","","Returns the argument unchanged.","","Returns the argument unchanged.","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","frame allocator instance through lazy_static!","","","manage a frame which has the same lifecycle as the tracker","an implementation for frame allocator","","","","","","","","","","","","","","","","","allocate a frame","a simple test for frame allocator","deallocate a frame","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","initiate the frame allocator using ekernel and MEMORY_END","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","heap allocator instance","heap space ([u8; KERNEL_HEAP_SIZE])","panic when heap allocation error occurs","","initiate heap allocator","","","a memory set instance through lazy_static! managing kernel …","map area structure, controls a contiguous piece of virtual …","map permission corresponding to that in pte: R W X U","map type for memory set: identical or framed","memory set structure, controls virtual-memory space","","","","","","","Returns the set containing all flags.","","Returns the intersection between the two sets of flags.","Disables all flags disabled in the set.","Returns the union of the two sets of flags.","Adds the set of flags.","Returns the raw value of the flags currently stored.","","Returns the left flags, but with all the right flags …","Toggles the set of flags.","","","","","","","","","","","","","","","","Returns the complement of this set of flags.","Returns true if all of the flags in other are contained …","data: start-aligned but maybe with shorter length assume …","","","Returns the difference between the flags in self and other.","","","","Returns an empty set of flags.","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Convert from underlying bit representation, unless that …","Convert from underlying bit representation, dropping any …","Convert from underlying bit representation, preserving all …","Include sections in elf and trampoline and TrapContext and …","","","Inserts the specified flags in-place.","Assume that no conflicts.","Returns the intersection between the flags in self and …","Returns true if there are flags common to both self and …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns true if all flags are currently set.","Returns true if no flags are currently stored.","","","","Mention that trampoline is not collected by areas.","","","","","Without kernel stacks.","Returns the complement of this set of flags.","","","","","Removes the specified flags in-place.","","","Inserts or removes the specified flags depending on the …","","","","Returns the set difference of the two sets of flags.","Disables all flags enabled in the set.","Returns the symmetric difference between the flags in self …","","","Toggles the specified flags in-place.","","","","","","","","","","","","","","","","","","Returns the union of between the flags in self and other.","","","","","","","page table entry flags","page table structure","page table entry structure","","","","","","Returns the set containing all flags.","Returns the intersection between the two sets of flags.","Disables all flags disabled in the set.","Returns the union of the two sets of flags.","Adds the set of flags.","Returns the raw value of the flags currently stored.","","","Returns the left flags, but with all the right flags …","Toggles the set of flags.","","","","","","","","","","","","Returns the complement of this set of flags.","Returns true if all of the flags in other are contained …","Returns the difference between the flags in self and other.","Returns an empty set of flags.","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Convert from underlying bit representation, unless that …","Convert from underlying bit representation, dropping any …","Convert from underlying bit representation, preserving all …","","Temporarily used to get arguments from user space.","","Inserts the specified flags in-place.","Returns the intersection between the flags in self and …","Returns true if there are flags common to both self and …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns true if all flags are currently set.","Returns true if no flags are currently stored.","","","","","","Returns the complement of this set of flags.","","","","Removes the specified flags in-place.","","Inserts or removes the specified flags depending on the …","Returns the set difference of the two sets of flags.","Disables all flags enabled in the set.","Returns the symmetric difference between the flags in self …","","","Toggles the specified flags in-place.","","","translate a pointer to a mutable u8 Vec through page table","","","","","","","","","","Returns the union of between the flags in self and other.","","","","","use sbi call to putchar in console (qemu uart handler)","general sbi call","use sbi call to set timer","use sbi call to shutdown the kernel","","Uniprocessor interior mutability primitives","Wrap a static data structure inside it so that we are able …","","","Exclusive access inner data in UPSafeCell. Panic if the …","Returns the argument unchanged.","inner data","Calls U::from(self).","User is responsible to guarantee that inner struct is only …","","","","","","","","File and filesystem-related syscalls","Process management syscalls","handle syscall exception with syscall_id and other …","","write buf of length len to a file with fd","task exits and submit an exit code","get current time","current task gives up resources for other tasks","a TaskManager global instance through lazy_static!","task context structure containing some registers","The task manager, where all the tasks are managed.","The task manager inner in ‘UPSafeCell’","","","","","","","","Implementation of TaskContext","id of current Running task","Get the current ‘Running’ task’s trap contexts.","Get the current ‘Running’ task’s token.","","Exit the current ‘Running’ task and run the next task …","Find next task to run and return task id.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Get the current ‘Running’ task’s token.","Get the current ‘Running’ task’s trap contexts.","use inner value to get mutable access","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Change the status of current Running task into Exited.","Change the status of current Running task into Exited.","Change the status of current Running task into Ready.","Change the status of current Running task into Ready.","total number of tasks","return address ( e.g. __restore ) of __switch ASM function","Run the first task in task list.","Run the first task in task list.","Switch current Running task to the task we have found, or …","Switch current Running task to the task we have found, or …","callee saved registers: s 0..11","kernel stack pointer of app","Suspend the current ‘Running’ task and run the next …","Rust wrapper around __switch.","Types related to task management","task list","","","","","","","","","","task context structure containing some registers","","","Returns the argument unchanged.","set Task Context{__restore ASM funciton: trap_return, sp: …","Calls U::from(self).","return address ( e.g. __restore ) of __switch ASM function","callee saved registers: s 0..11","kernel stack pointer of app","","","","init task context","Switch to the context of next_task_cx_ptr, saving the …","","","","task control block structure","task status: UnInit, Ready, Running, Exited","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","get current time in microseconds","set the next timer interrupt","trap context structure containing sstatus, sepc and …","Implementation of TrapContext","enable timer interrupt in sie CSR","initialize CSR stvec as the entry of __alltraps","Addr of Page Table","kernel stack","CSR sepc","","","CSR sstatus ","Unimplement: traps/interrupts/exceptions from kernel mode …","handle an interrupt, exception, or system call from user …","Addr of trap_handler function","set the new addr of __restore asm function in TRAMPOLINE …","general regs[0..31]","trap context structure containing sstatus, sepc and …","init app context","","","Returns the argument unchanged.","Calls U::from(self).","Addr of Page Table","kernel stack","CSR sepc","set stack pointer to x_2 reg (sp)","CSR sstatus ","Addr of trap_handler function","","","","general regs[0..31]"],"i":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,50,3,0,50,3,50,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,9,9,9,9,0,9,9,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,15,16,17,0,0,0,0,0,0,0,0,0,0,0,0,13,15,22,13,15,16,17,19,22,13,15,16,17,19,13,15,13,15,16,17,19,13,15,16,17,19,13,15,16,17,22,22,13,15,16,17,13,15,13,15,16,17,22,13,13,13,15,15,15,16,16,16,17,17,17,19,16,19,16,16,19,17,22,13,15,16,17,19,22,19,19,13,15,16,17,22,19,22,13,15,13,15,16,17,19,51,17,13,15,16,17,19,22,13,15,16,17,19,22,13,15,16,17,19,22,13,15,16,17,19,0,0,0,0,0,25,52,24,27,24,25,27,24,25,24,52,24,25,27,24,27,0,0,0,27,24,25,24,0,27,24,25,52,27,24,27,24,27,24,25,27,24,25,27,24,25,0,0,0,0,0,32,32,0,0,0,0,0,30,30,30,30,35,29,30,29,30,30,30,30,30,30,30,30,29,33,35,32,30,29,33,35,32,30,32,30,32,30,30,30,30,33,33,35,30,0,0,0,30,32,30,0,0,30,32,30,30,30,30,30,29,33,35,32,30,30,30,30,29,30,30,30,29,30,30,29,33,35,32,30,30,30,33,33,33,29,33,30,33,29,29,30,29,30,29,0,30,0,0,30,0,0,0,30,30,30,32,30,30,29,29,29,33,35,32,30,29,33,35,32,30,29,33,35,32,30,30,33,33,33,39,39,39,0,0,0,39,39,39,39,39,39,39,39,39,39,39,39,38,39,39,34,39,38,34,39,38,39,38,39,38,39,39,39,39,39,38,39,38,39,34,34,38,39,39,39,39,39,34,34,39,38,39,39,39,39,34,39,39,39,39,34,39,38,39,39,38,34,39,34,38,39,39,38,38,39,34,39,39,39,39,39,38,39,34,34,0,34,39,38,34,39,38,34,39,38,39,34,38,0,0,0,0,0,0,0,0,0,26,26,26,26,26,26,26,26,26,26,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,46,53,45,46,53,45,0,53,0,0,45,0,46,46,53,45,46,46,46,46,53,45,0,46,0,46,46,47,0,46,0,46,47,47,0,0,0,53,46,53,45,46,53,45,46,53,45,0,47,47,47,47,47,47,47,47,47,47,47,47,0,48,48,48,0,0,49,49,48,49,48,48,48,48,49,48,49,49,49,48,49,49,49,49,48,49,49,48,49,48,49,48,0,0,0,0,0,0,0,0,0,44,44,44,0,0,44,0,0,44,0,44,0,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44],"f":[0,[[]],0,0,0,0,0,0,0,[[],1],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[]],[[]],[2,1],[[3,2],1],[2,2],[[],1],[3,1],[[],1],[3,1],[[]],[[]],[4,3],[[],5],[[],5],[[],6],0,0,0,0,0,0,0,0,0,0,[7],0,[[]],[[]],[[]],[[]],[8],[[],5],[[],5],[[],6],[[9,10],11],[12,1],[7],[[],7],0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[13,14],[15,14],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[13,16],[15,17],[13,13],[15,15],[16,16],[17,17],[[[19,[18]]],[[19,[18]]]],[[]],[[]],[[]],[[]],[[]],[[13,13],20],[[15,15],20],[[16,16],20],[[17,17],20],0,0,[[13,13],14],[[15,15],14],[[16,16],14],[[17,17],14],[13,16],[15,17],[[13,21],11],[[15,21],11],[[16,21],11],[[17,21],11],[[]],[16,13],[7,13],[[]],[7,15],[17,15],[[]],[13,16],[[]],[7,16],[7,17],[15,17],[[]],[[]],[16],[19],[16],[16],[19],[17],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[19],0,[[13,13],14],[[15,15],14],[[16,16],14],[[17,17],14],[[],22],[[],19],[22,23],[13,7],[15,7],[[13,13],[[23,[20]]]],[[15,15],[[23,[20]]]],[[16,16],[[23,[20]]]],[[17,17],[[23,[20]]]],0,[[]],[17],[[]],[[]],[[]],[[]],[[]],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],6],[[],6],[[],6],[[],6],[[],6],[[],6],0,0,0,0,0,0,[[],[[23,[16]]]],[24,[[23,[16]]]],[[]],[[]],[[]],[[]],[[]],[[]],0,[16],[[24,16]],[25,26],[27],0,[[27,21],11],[[],[[23,[27]]]],[[]],[16],[[]],[[]],[[]],[[24,16,16]],[[]],[[]],[[]],[[]],[[]],[16,27],[[],24],0,0,[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],6],[[],6],[[],6],0,0,[28,1],[[]],[[]],0,0,0,0,0,0,0,0,0,0,0,0,[29],[[],30],0,[[30,30],30],[[30,30]],[[30,30],30],[[30,30]],[30,31],0,[[30,30],30],[[30,30]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[32,32],[30,30],[[]],[[]],[[30,30],20],[30,30],[[30,30],14],[[33,34]],0,[35,36],[[30,30],30],0,0,0,[[],30],[[32,32],14],[[30,30],14],0,0,[[30,37]],[[32,21],11],[[30,21],11],[[30,21],11],[[30,21],11],[[30,21],11],[[30,21],11],[[]],[[]],[[]],[[]],[[]],[31,[[23,[30]]]],[31,30],[31,30],[[]],[37,30],[30],[[30,30]],[[29,15,15,30]],[[30,30],30],[[30,30],14],[[]],[[]],[[]],[[]],[[]],[30,14],[30,14],[[33,34]],[[33,34,17]],0,[29],0,[[30,30],14],[[15,15,32,30],33],[[],29],[[],29],[30,30],0,[[30,30],[[23,[20]]]],[[29,33,23]],[[]],[[30,30]],0,0,[[30,30,14]],0,0,0,[[30,30],30],[[30,30]],[[30,30],30],[[]],[[]],[[30,30]],[29,7],[[29,17],[[23,[38]]]],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],6],[[],6],[[],6],[[],6],[[],6],[[30,30],30],[[33,34]],[[33,34,17]],0,0,0,0,0,0,0,0,0,0,0,0,[[],39],[[39,39],39],[[39,39]],[[39,39],39],[[39,39]],[39,31],0,0,[[39,39],39],[[39,39]],[[]],[[]],[[]],[[]],[[]],[[]],[39,39],[38,38],[[]],[[]],[[39,39],20],[39,39],[[39,39],14],[[39,39],39],[[],39],[[],38],[[39,39],14],[38,14],[[39,37]],[[34,17],[[23,[38]]]],[[34,17],[[23,[38]]]],[38,39],[[39,21],11],[[39,21],11],[[39,21],11],[[39,21],11],[[39,21],11],0,[[]],[[]],[[]],[31,[[23,[39]]]],[31,39],[31,39],[37,39],[7,34],[39],[[39,39]],[[39,39],39],[[39,39],14],[[]],[[]],[[]],[39,14],[39,14],[38,14],[[34,17,16,39]],[[39,39],14],[[],34],[[16,39],38],[39,39],[[39,39],[[23,[20]]]],[38,16],[38,14],[[39,39]],0,[[39,39,14]],[[39,39],39],[[39,39]],[[39,39],39],[[]],[[]],[[39,39]],[34,7],[[34,17],[[23,[38]]]],[[7,31,7],40],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],6],[[],6],[[],6],[[39,39],39],[[34,17]],[38,14],0,0,[7],[[7,7,7,7],7],[7],[[],1],0,0,0,[[]],[[]],[26,41],[[]],0,[[]],[[],26],[[],5],[[],5],[[],6],0,0,0,0,0,0,[7,42],0,[[7,31,7],42],[43,1],[[],42],[[],42],0,0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],0,0,[[],44],[[],7],[45,46],[[]],[46,[[23,[7]]]],[[]],[[]],[[]],[46,7],[46,44],0,[[]],[[]],[[]],[[]],[46],[[]],[46],0,0,[[]],[46,1],[[]],[46],0,0,[[]],0,0,0,[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],6],[[],6],[[],6],0,[[]],[[]],[[]],[7,47],[[]],0,0,0,[[],5],[[],5],[[],6],[[],47],0,0,0,0,0,0,0,[[]],[[]],[[]],[[]],[48,48],[[]],[[48,48],14],[[]],[[]],[49,44],[49,7],[[]],[[]],0,[7,49],0,0,[[]],0,[[],5],[[],5],[[],5],[[],5],[[],6],[[],6],0,0,[[],7],[[],7],[[]],0,0,[[]],[[]],0,0,0,[[]],[[]],0,[[],1],[[],1],0,[[],1],0,0,[[7,7,7,7,7],44],[[]],[[]],[[]],[[]],0,0,0,[[44,7]],0,0,[[],5],[[],5],[[],6],0],"p":[[15,"never"],[15,"u32"],[3,"RISCV64"],[15,"u64"],[4,"Result"],[3,"TypeId"],[15,"usize"],[3,"Arguments"],[3,"Stdout"],[15,"str"],[6,"Result"],[3,"PanicInfo"],[3,"PhysAddr"],[15,"bool"],[3,"VirtAddr"],[3,"PhysPageNum"],[3,"VirtPageNum"],[8,"Clone"],[3,"SimpleRange"],[4,"Ordering"],[3,"Formatter"],[3,"SimpleRangeIterator"],[4,"Option"],[3,"StackFrameAllocator"],[3,"FRAME_ALLOCATOR"],[3,"UPSafeCell"],[3,"FrameTracker"],[3,"Layout"],[3,"MemorySet"],[3,"MapPermission"],[15,"u8"],[4,"MapType"],[3,"MapArea"],[3,"PageTable"],[3,"KERNEL_SPACE"],[3,"Arc"],[8,"IntoIterator"],[3,"PageTableEntry"],[3,"PTEFlags"],[3,"Vec"],[3,"RefMut"],[15,"isize"],[15,"i32"],[3,"TrapContext"],[3,"TASK_MANAGER"],[3,"TaskManager"],[3,"TaskContext"],[4,"TaskStatus"],[3,"TaskControlBlock"],[8,"QEMUExit"],[8,"StepByOne"],[8,"FrameAllocator"],[3,"TaskManagerInner"]]}\ }'); if (typeof window !== 'undefined' && window.initSearch) {window.initSearch(searchIndex)}; if (typeof exports !== 'undefined') {exports.searchIndex = searchIndex}; diff --git a/ch4/settings.css b/ch4/settings.css index 7178567e..a142e14f 100644 --- a/ch4/settings.css +++ b/ch4/settings.css @@ -1 +1 @@ -.setting-line{margin:0.6em 0 0.6em 0.3em;position:relative;}.setting-line .choices{display:flex;flex-wrap:wrap;}.setting-line .radio-line input{margin-right:0.3em;height:1.2rem;width:1.2rem;border:1px solid;outline:none;-webkit-appearance:none;cursor:pointer;border-radius:50%;}.setting-line .radio-line input+span{padding-bottom:1px;}.radio-line .setting-name{width:100%;}.radio-line .choice{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:flex;align-items:center;cursor:pointer;}.radio-line .choice+.choice{margin-left:0.5em;}.toggle{position:relative;display:inline-block;width:100%;height:27px;margin-right:20px;display:flex;align-items:center;cursor:pointer;}.toggle input{opacity:0;position:absolute;}.slider{position:relative;width:45px;display:block;height:28px;margin-right:20px;cursor:pointer;background-color:#ccc;transition:.3s;}.slider:before{position:absolute;content:"";height:19px;width:19px;left:4px;bottom:4px;transition:.3s;}input:checked+.slider:before{transform:translateX(19px);}.setting-line>.sub-settings{padding-left:42px;width:100%;display:block;}#settings .setting-line{margin:1.2em 0.6em;} \ No newline at end of file +.setting-line{margin:0.6em 0 0.6em 0.3em;position:relative;}.setting-line .choices{display:flex;flex-wrap:wrap;}.setting-line .radio-line input{margin-right:0.3em;height:1.2rem;width:1.2rem;border:1px solid;outline:none;-webkit-appearance:none;cursor:pointer;border-radius:50%;}.setting-line .radio-line input+span{padding-bottom:1px;}.radio-line .setting-name{width:100%;}.radio-line .choice{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:flex;align-items:center;cursor:pointer;}.radio-line .choice+.choice{margin-left:0.5em;}.toggle{position:relative;width:100%;margin-right:20px;display:flex;align-items:center;cursor:pointer;}.toggle input{opacity:0;position:absolute;}.slider{position:relative;width:45px;min-width:45px;display:block;height:28px;margin-right:20px;cursor:pointer;background-color:#ccc;transition:.3s;}.slider:before{position:absolute;content:"";height:19px;width:19px;left:4px;bottom:4px;transition:.3s;}input:checked+.slider:before{transform:translateX(19px);}.setting-line>.sub-settings{padding-left:42px;width:100%;display:block;}#settings .setting-line{margin:1.2em 0.6em;} \ No newline at end of file diff --git a/ch4/settings.html b/ch4/settings.html index d7076efd..ecb27c50 100644 --- a/ch4/settings.html +++ b/ch4/settings.html @@ -1,8 +1 @@ -Rustdoc settings -

Rustdoc settings

Back
- \ No newline at end of file +Rustdoc settings

Rustdoc settings

Back
\ No newline at end of file diff --git a/ch4/source-files.js b/ch4/source-files.js index e5e463c4..1992d03f 100644 --- a/ch4/source-files.js +++ b/ch4/source-files.js @@ -1,3 +1,4 @@ -var sourcesIndex = {}; -sourcesIndex["os"] = {"name":"","dirs":[{"name":"boards","files":["qemu.rs"]},{"name":"mm","files":["address.rs","frame_allocator.rs","heap_allocator.rs","memory_set.rs","mod.rs","page_table.rs"]},{"name":"sync","files":["mod.rs","up.rs"]},{"name":"syscall","files":["fs.rs","mod.rs","process.rs"]},{"name":"task","files":["context.rs","mod.rs","switch.rs","task.rs"]},{"name":"trap","files":["context.rs","mod.rs"]}],"files":["config.rs","console.rs","lang_items.rs","loader.rs","main.rs","sbi.rs","timer.rs"]}; +var sourcesIndex = JSON.parse('{\ +"os":["",[["boards",[],["qemu.rs"]],["mm",[],["address.rs","frame_allocator.rs","heap_allocator.rs","memory_set.rs","mod.rs","page_table.rs"]],["sync",[],["mod.rs","up.rs"]],["syscall",[],["fs.rs","mod.rs","process.rs"]],["task",[],["context.rs","mod.rs","switch.rs","task.rs"]],["trap",[],["context.rs","mod.rs"]]],["config.rs","console.rs","lang_items.rs","loader.rs","main.rs","sbi.rs","timer.rs"]]\ +}'); createSourceSidebar(); diff --git a/ch4/source-script.js b/ch4/source-script.js index bdad923d..e0fac073 100644 --- a/ch4/source-script.js +++ b/ch4/source-script.js @@ -1 +1 @@ -"use strict";(function(){const rootPath=document.getElementById("rustdoc-vars").attributes["data-root-path"].value;let oldScrollPosition=0;function closeSidebarIfMobile(){if(window.innerWidth"){if(window.innerWidth";updateLocalStorage("source-sidebar-show","false")}}function createSidebarToggle(){const sidebarToggle=document.createElement("div");sidebarToggle.id="sidebar-toggle";const inner=document.createElement("button");if(getCurrentValue("source-sidebar-show")==="true"){inner.innerText="<"}else{inner.innerText=">"}inner.onclick=toggleSidebar;sidebarToggle.appendChild(inner);return sidebarToggle}function createSourceSidebar(){const container=document.querySelector("nav.sidebar");const sidebarToggle=createSidebarToggle();container.insertBefore(sidebarToggle,container.firstChild);const sidebar=document.createElement("div");sidebar.id="source-sidebar";let hasFoundFile=false;const title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(sourcesIndex).forEach(key=>{sourcesIndex[key].name=key;hasFoundFile=createDirEntry(sourcesIndex[key],sidebar,"",hasFoundFile)});container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}const lineNumbersRegex=/^#?(\d+)(?:-(\d+))?$/;function highlightSourceLines(match){if(typeof match==="undefined"){match=window.location.hash.match(lineNumbersRegex)}if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to{onEachLazy(e.getElementsByTagName("span"),i_e=>{removeClass(i_e,"line-highlighted")})});for(let i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}const handleSourceHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSourceLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)){return}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",()=>{const match=window.location.hash.match(lineNumbersRegex);if(match){return highlightSourceLines(match)}});onEachLazy(document.getElementsByClassName("line-numbers"),el=>{el.addEventListener("click",handleSourceHighlight)});highlightSourceLines();window.createSourceSidebar=createSourceSidebar})() \ No newline at end of file +"use strict";(function(){const rootPath=document.getElementById("rustdoc-vars").attributes["data-root-path"].value;let oldScrollPosition=0;const NAME_OFFSET=0;const DIRS_OFFSET=1;const FILES_OFFSET=2;function closeSidebarIfMobile(){if(window.innerWidth"){if(window.innerWidth";updateLocalStorage("source-sidebar-show","false")}}function createSidebarToggle(){const sidebarToggle=document.createElement("div");sidebarToggle.id="sidebar-toggle";const inner=document.createElement("button");if(getCurrentValue("source-sidebar-show")==="true"){inner.innerText="<"}else{inner.innerText=">"}inner.onclick=toggleSidebar;sidebarToggle.appendChild(inner);return sidebarToggle}function createSourceSidebar(){const container=document.querySelector("nav.sidebar");const sidebarToggle=createSidebarToggle();container.insertBefore(sidebarToggle,container.firstChild);const sidebar=document.createElement("div");sidebar.id="source-sidebar";let hasFoundFile=false;const title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(sourcesIndex).forEach(key=>{sourcesIndex[key][NAME_OFFSET]=key;hasFoundFile=createDirEntry(sourcesIndex[key],sidebar,"",hasFoundFile)});container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}const lineNumbersRegex=/^#?(\d+)(?:-(\d+))?$/;function highlightSourceLines(match){if(typeof match==="undefined"){match=window.location.hash.match(lineNumbersRegex)}if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to{onEachLazy(e.getElementsByTagName("span"),i_e=>{removeClass(i_e,"line-highlighted")})});for(let i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}const handleSourceHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSourceLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)){return}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",()=>{const match=window.location.hash.match(lineNumbersRegex);if(match){return highlightSourceLines(match)}});onEachLazy(document.getElementsByClassName("line-numbers"),el=>{el.addEventListener("click",handleSourceHighlight)});highlightSourceLines();window.createSourceSidebar=createSourceSidebar})() \ No newline at end of file diff --git a/ch4/src/os/boards/qemu.rs.html b/ch4/src/os/boards/qemu.rs.html index 1f9f198d..155d09c5 100644 --- a/ch4/src/os/boards/qemu.rs.html +++ b/ch4/src/os/boards/qemu.rs.html @@ -1,10 +1,4 @@ -qemu.rs - source -
1
+qemu.rs - source
1
 2
 3
 4
@@ -179,5 +173,4 @@
 
 pub const QEMU_EXIT_HANDLE: RISCV64 = RISCV64::new(VIRT_TEST);
 
-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/src/os/config.rs.html b/ch4/src/os/config.rs.html index 0f45dfa4..c641ac31 100644 --- a/ch4/src/os/config.rs.html +++ b/ch4/src/os/config.rs.html @@ -1,10 +1,4 @@ -config.rs - source -
1
+config.rs - source
1
 2
 3
 4
@@ -43,5 +37,4 @@
 
 pub use crate::board::{CLOCK_FREQ, MMIO};
 
-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/src/os/console.rs.html b/ch4/src/os/console.rs.html index 24b9305c..d2b23063 100644 --- a/ch4/src/os/console.rs.html +++ b/ch4/src/os/console.rs.html @@ -1,10 +1,4 @@ -console.rs - source -
1
+console.rs - source
1
 2
 3
 4
@@ -75,5 +69,4 @@
     }
 }
 
-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/src/os/lang_items.rs.html b/ch4/src/os/lang_items.rs.html index ae5bdc5d..69dd544d 100644 --- a/ch4/src/os/lang_items.rs.html +++ b/ch4/src/os/lang_items.rs.html @@ -1,10 +1,4 @@ -lang_items.rs - source -
1
+lang_items.rs - source
1
 2
 3
 4
@@ -45,5 +39,4 @@
     shutdown()
 }
 
-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/src/os/loader.rs.html b/ch4/src/os/loader.rs.html index 0c713fdd..44ef0433 100644 --- a/ch4/src/os/loader.rs.html +++ b/ch4/src/os/loader.rs.html @@ -1,10 +1,4 @@ -loader.rs - source -
1
+loader.rs - source
1
 2
 3
 4
@@ -57,5 +51,4 @@
     }
 }
 
-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/src/os/main.rs.html b/ch4/src/os/main.rs.html index 6a3ec9e1..dd167ec1 100644 --- a/ch4/src/os/main.rs.html +++ b/ch4/src/os/main.rs.html @@ -1,10 +1,4 @@ -main.rs - source -
1
+main.rs - source
1
 2
 3
 4
@@ -163,5 +157,4 @@
     panic!("Unreachable in rust_main!");
 }
 
-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/src/os/mm/address.rs.html b/ch4/src/os/mm/address.rs.html index a6fb82de..7a9e32bf 100644 --- a/ch4/src/os/mm/address.rs.html +++ b/ch4/src/os/mm/address.rs.html @@ -1,10 +1,4 @@ -address.rs - source -
1
+address.rs - source
1
 2
 3
 4
@@ -515,5 +509,4 @@
 /// a simple range structure for virtual page number
 pub type VPNRange = SimpleRange<VirtPageNum>;
 
-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/src/os/mm/frame_allocator.rs.html b/ch4/src/os/mm/frame_allocator.rs.html index 49d41dcd..d0e26a26 100644 --- a/ch4/src/os/mm/frame_allocator.rs.html +++ b/ch4/src/os/mm/frame_allocator.rs.html @@ -1,10 +1,4 @@ -frame_allocator.rs - source -
1
+frame_allocator.rs - source
1
 2
 3
 4
@@ -277,5 +271,4 @@
     println!("frame_allocator_test passed!");
 }
 
-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/src/os/mm/heap_allocator.rs.html b/ch4/src/os/mm/heap_allocator.rs.html index 437e57da..2a3c02f8 100644 --- a/ch4/src/os/mm/heap_allocator.rs.html +++ b/ch4/src/os/mm/heap_allocator.rs.html @@ -1,10 +1,4 @@ -heap_allocator.rs - source -
1
+heap_allocator.rs - source
1
 2
 3
 4
@@ -107,5 +101,4 @@
     println!("heap_test passed!");
 }
 
-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/src/os/mm/memory_set.rs.html b/ch4/src/os/mm/memory_set.rs.html index 52d2eb82..1b261ee4 100644 --- a/ch4/src/os/mm/memory_set.rs.html +++ b/ch4/src/os/mm/memory_set.rs.html @@ -1,10 +1,4 @@ -memory_set.rs - source -
1
+memory_set.rs - source
1
 2
 3
 4
@@ -715,5 +709,4 @@
     println!("remap_test passed!");
 }
 
-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/src/os/mm/mod.rs.html b/ch4/src/os/mm/mod.rs.html index aca6a953..b9ab1929 100644 --- a/ch4/src/os/mm/mod.rs.html +++ b/ch4/src/os/mm/mod.rs.html @@ -1,10 +1,4 @@ -mod.rs - source -
1
+mod.rs - source
1
 2
 3
 4
@@ -61,5 +55,4 @@
     KERNEL_SPACE.exclusive_access().activate();
 }
 
-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/src/os/mm/page_table.rs.html b/ch4/src/os/mm/page_table.rs.html index 6de38e94..4803d11b 100644 --- a/ch4/src/os/mm/page_table.rs.html +++ b/ch4/src/os/mm/page_table.rs.html @@ -1,10 +1,4 @@ -page_table.rs - source -
1
+page_table.rs - source
1
 2
 3
 4
@@ -319,5 +313,4 @@
     v
 }
 
-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/src/os/sbi.rs.html b/ch4/src/os/sbi.rs.html index a1d59546..e79b820e 100644 --- a/ch4/src/os/sbi.rs.html +++ b/ch4/src/os/sbi.rs.html @@ -1,10 +1,4 @@ -sbi.rs - source -
1
+sbi.rs - source
1
 2
 3
 4
@@ -127,5 +121,4 @@
     panic!("It should shutdown!");
 }
 
-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/src/os/sync/mod.rs.html b/ch4/src/os/sync/mod.rs.html index fe8b2e2d..7254c0d6 100644 --- a/ch4/src/os/sync/mod.rs.html +++ b/ch4/src/os/sync/mod.rs.html @@ -1,10 +1,4 @@ -mod.rs - source -
1
+mod.rs - source
1
 2
 3
 4
@@ -15,5 +9,4 @@
 
 pub use up::UPSafeCell;
 
-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/src/os/sync/up.rs.html b/ch4/src/os/sync/up.rs.html index bc38c4ef..c085d6ca 100644 --- a/ch4/src/os/sync/up.rs.html +++ b/ch4/src/os/sync/up.rs.html @@ -1,10 +1,4 @@ -up.rs - source -
1
+up.rs - source
1
 2
 3
 4
@@ -67,5 +61,4 @@
     }
 }
 
-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/src/os/syscall/fs.rs.html b/ch4/src/os/syscall/fs.rs.html index 5ad4e0ad..34ad51d1 100644 --- a/ch4/src/os/syscall/fs.rs.html +++ b/ch4/src/os/syscall/fs.rs.html @@ -1,10 +1,4 @@ -fs.rs - source -
1
+fs.rs - source
1
 2
 3
 4
@@ -49,5 +43,4 @@
     }
 }
 
-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/src/os/syscall/mod.rs.html b/ch4/src/os/syscall/mod.rs.html index 352ce8cc..7b6e58fe 100644 --- a/ch4/src/os/syscall/mod.rs.html +++ b/ch4/src/os/syscall/mod.rs.html @@ -1,10 +1,4 @@ -mod.rs - source -
1
+mod.rs - source
1
 2
 3
 4
@@ -71,5 +65,4 @@
     }
 }
 
-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/src/os/syscall/process.rs.html b/ch4/src/os/syscall/process.rs.html index 89a6708b..69246569 100644 --- a/ch4/src/os/syscall/process.rs.html +++ b/ch4/src/os/syscall/process.rs.html @@ -1,10 +1,4 @@ -process.rs - source -
1
+process.rs - source
1
 2
 3
 4
@@ -49,5 +43,4 @@
     get_time_ms() as isize
 }
 
-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/src/os/task/context.rs.html b/ch4/src/os/task/context.rs.html index 2a4ea1fc..76b163af 100644 --- a/ch4/src/os/task/context.rs.html +++ b/ch4/src/os/task/context.rs.html @@ -1,10 +1,4 @@ -context.rs - source -
1
+context.rs - source
1
 2
 3
 4
@@ -69,5 +63,4 @@
     }
 }
 
-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/src/os/task/mod.rs.html b/ch4/src/os/task/mod.rs.html index 84e673fa..cb9d12a4 100644 --- a/ch4/src/os/task/mod.rs.html +++ b/ch4/src/os/task/mod.rs.html @@ -1,10 +1,4 @@ -mod.rs - source -
1
+mod.rs - source
1
 2
 3
 4
@@ -405,5 +399,4 @@
     TASK_MANAGER.get_current_trap_cx()
 }
 
-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/src/os/task/switch.rs.html b/ch4/src/os/task/switch.rs.html index 6610a9a5..0ca3cd8c 100644 --- a/ch4/src/os/task/switch.rs.html +++ b/ch4/src/os/task/switch.rs.html @@ -1,10 +1,4 @@ -switch.rs - source -
1
+switch.rs - source
1
 2
 3
 4
@@ -35,5 +29,4 @@
     pub fn __switch(current_task_cx_ptr: *mut TaskContext, next_task_cx_ptr: *const TaskContext);
 }
 
-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/src/os/task/task.rs.html b/ch4/src/os/task/task.rs.html index 8baa931b..bcaf84ef 100644 --- a/ch4/src/os/task/task.rs.html +++ b/ch4/src/os/task/task.rs.html @@ -1,10 +1,4 @@ -task.rs - source -
1
+task.rs - source
1
 2
 3
 4
@@ -133,5 +127,4 @@
     Exited,
 }
 
-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/src/os/timer.rs.html b/ch4/src/os/timer.rs.html index e3f71d21..d8f203a9 100644 --- a/ch4/src/os/timer.rs.html +++ b/ch4/src/os/timer.rs.html @@ -1,10 +1,4 @@ -timer.rs - source -
1
+timer.rs - source
1
 2
 3
 4
@@ -49,5 +43,4 @@
     set_timer(get_time() + CLOCK_FREQ / TICKS_PER_SEC);
 }
 
-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/src/os/trap/context.rs.html b/ch4/src/os/trap/context.rs.html index 946dbfdb..a8622e59 100644 --- a/ch4/src/os/trap/context.rs.html +++ b/ch4/src/os/trap/context.rs.html @@ -1,10 +1,4 @@ -context.rs - source -
1
+context.rs - source
1
 2
 3
 4
@@ -101,5 +95,4 @@
     }
 }
 
-
- \ No newline at end of file +
\ No newline at end of file diff --git a/ch4/src/os/trap/mod.rs.html b/ch4/src/os/trap/mod.rs.html index 8e83293e..7a7f361d 100644 --- a/ch4/src/os/trap/mod.rs.html +++ b/ch4/src/os/trap/mod.rs.html @@ -1,10 +1,4 @@ -mod.rs - source -
1
+mod.rs - source
1
 2
 3
 4
@@ -255,5 +249,4 @@
 
 pub use context::TrapContext;
 
-
- \ No newline at end of file +
\ No newline at end of file