diff --git a/main/os/task/id/fn.trap_cx_bottom_from_tid.html b/main/os/task/id/fn.trap_cx_bottom_from_tid.html index 9ba11c29..1aef566c 100644 --- a/main/os/task/id/fn.trap_cx_bottom_from_tid.html +++ b/main/os/task/id/fn.trap_cx_bottom_from_tid.html @@ -1 +1 @@ -
Return (bottom, top) of a kernel stack in kernel space.
+pub struct KernelStack(pub usize);
0: usize
Executes the destructor for this type. Read more
+pub struct KernelStack(pub usize);
0: usize
Immutably borrows from an owned value. Read more
diff --git a/main/os/task/id/struct.TaskUserRes.html b/main/os/task/id/struct.TaskUserRes.html index 895778ea..5131c70e 100644 --- a/main/os/task/id/struct.TaskUserRes.html +++ b/main/os/task/id/struct.TaskUserRes.html @@ -1,8 +1,8 @@ -pub struct TaskUserRes {
+TaskUserRes in os::task::id - Rust pub struct TaskUserRes {
pub tid: usize,
pub ustack_base: usize,
pub process: Weak<ProcessControlBlock>,
-}
Fields
tid: usize
ustack_base: usize
process: Weak<ProcessControlBlock>
Implementations
sourceimpl TaskUserRes
sourcepub fn new(
process: Arc<ProcessControlBlock>,
ustack_base: usize,
alloc_user_res: bool
) -> Self
sourcepub fn alloc_user_res(&self)
sourcefn dealloc_user_res(&self)
sourcepub fn alloc_tid(&mut self)
sourcepub fn dealloc_tid(&self)
sourcepub fn trap_cx_user_va(&self) -> usize
sourcepub fn trap_cx_ppn(&self) -> PhysPageNum
sourcepub fn ustack_base(&self) -> usize
sourcepub fn ustack_top(&self) -> usize
Trait Implementations
sourceimpl Drop for TaskUserRes
sourcefn drop(&mut self)
Executes the destructor for this type. Read more
+}Fields
tid: usize
ustack_base: usize
process: Weak<ProcessControlBlock>
Implementations
sourceimpl TaskUserRes
sourcepub fn new(
process: Arc<ProcessControlBlock>,
ustack_base: usize,
alloc_user_res: bool
) -> Self
sourcepub fn alloc_user_res(&self)
sourcefn dealloc_user_res(&self)
sourcepub fn alloc_tid(&mut self)
sourcepub fn dealloc_tid(&self)
sourcepub fn trap_cx_user_va(&self) -> usize
sourcepub fn trap_cx_ppn(&self) -> PhysPageNum
sourcepub fn ustack_base(&self) -> usize
sourcepub fn ustack_top(&self) -> usize
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for TaskUserRes
impl Send for TaskUserRes
impl Sync for TaskUserRes
impl Unpin for TaskUserRes
impl !UnwindSafe for TaskUserRes
Blanket Implementations
sourceimpl<T> Borrow<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow(&self) -> &T
Immutably borrows from an owned value. Read more
diff --git a/main/src/os/drivers/block/virtio_blk.rs.html b/main/src/os/drivers/block/virtio_blk.rs.html
index 02dfbf26..f7e722a9 100644
--- a/main/src/os/drivers/block/virtio_blk.rs.html
+++ b/main/src/os/drivers/block/virtio_blk.rs.html
@@ -86,12 +86,12 @@
86
87
use super::BlockDevice;
-use crate::drivers::bus::virtio::VirtioHal;
use crate::sync::{Condvar, UPIntrFreeCell};
use crate::task::schedule;
use crate::DEV_NON_BLOCKING_ACCESS;
use alloc::collections::BTreeMap;
use virtio_drivers::{BlkResp, RespStatus, VirtIOBlk, VirtIOHeader};
+use crate::drivers::bus::virtio::VirtioHal;
#[allow(unused)]
const VIRTIO0: usize = 0x10008000;
diff --git a/main/src/os/drivers/gpu/mod.rs.html b/main/src/os/drivers/gpu/mod.rs.html
index 56175a79..5ce52ea4 100644
--- a/main/src/os/drivers/gpu/mod.rs.html
+++ b/main/src/os/drivers/gpu/mod.rs.html
@@ -66,13 +66,13 @@
66
67
68
-
use crate::drivers::bus::virtio::VirtioHal;
-use crate::sync::UPIntrFreeCell;
+
use crate::sync::UPIntrFreeCell;
use alloc::{sync::Arc, vec::Vec};
use core::any::Any;
use embedded_graphics::pixelcolor::Rgb888;
use tinybmp::Bmp;
use virtio_drivers::{VirtIOGpu, VirtIOHeader};
+use crate::drivers::bus::virtio::VirtioHal;
const VIRTIO7: usize = 0x10007000;
pub trait GpuDevice: Send + Sync + Any {
fn update_cursor(&self);
diff --git a/main/src/os/drivers/mod.rs.html b/main/src/os/drivers/mod.rs.html
index 50bdc73a..de3ee12e 100644
--- a/main/src/os/drivers/mod.rs.html
+++ b/main/src/os/drivers/mod.rs.html
@@ -25,5 +25,6 @@
pub use chardev::UART;
pub use gpu::*;
pub use input::*;
-pub use net::*;
+pub use net::*;
+
\ No newline at end of file
diff --git a/main/src/os/task/id.rs.html b/main/src/os/task/id.rs.html
index 3f101e3b..fdbde34b 100644
--- a/main/src/os/task/id.rs.html
+++ b/main/src/os/task/id.rs.html
@@ -223,6 +223,7 @@
223
224
225
+226
use super::ProcessControlBlock;
use crate::config::{KERNEL_STACK_SIZE, PAGE_SIZE, TRAMPOLINE, TRAP_CONTEXT_BASE, USER_STACK_SIZE};
use crate::mm::{MapPermission, PhysPageNum, VirtAddr, KERNEL_SPACE};
@@ -312,6 +313,7 @@
KERNEL_SPACE
.exclusive_access()
.remove_area_with_start_vpn(kernel_stack_bottom_va.into());
+ KSTACK_ALLOCATOR.exclusive_access().dealloc(self.0);
}
}