From 614a7aa93de9e28ca332be359c14a1e176dc2d40 Mon Sep 17 00:00:00 2001 From: wyfcyx Date: Sat, 21 May 2022 23:05:42 +0000 Subject: [PATCH] deploy: 82c2eca278b5ecd9ddcca89d4170f9e6dd5ba015 --- ch8/os/task/fn.add_initproc.html | 2 +- ch8/os/task/fn.check_signals_of_current.html | 2 +- ch8/os/task/fn.current_add_signal.html | 2 +- ch8/os/task/fn.exit_current_and_run_next.html | 2 +- ch8/os/task/fn.remove_inactive_task.html | 2 +- ch8/os/task/index.html | 2 +- ch8/os/task/struct.INITPROC.html | 8 ++++---- ch8/src/os/task/mod.rs.html | 8 ++++++++ 8 files changed, 18 insertions(+), 10 deletions(-) diff --git a/ch8/os/task/fn.add_initproc.html b/ch8/os/task/fn.add_initproc.html index af8a3edd..280243e4 100644 --- a/ch8/os/task/fn.add_initproc.html +++ b/ch8/os/task/fn.add_initproc.html @@ -4,5 +4,5 @@
-

Function os::task::add_initproc

source · []
pub fn add_initproc()
+

Function os::task::add_initproc

source · []
pub fn add_initproc()
\ No newline at end of file diff --git a/ch8/os/task/fn.check_signals_of_current.html b/ch8/os/task/fn.check_signals_of_current.html index 182c67be..d7fe342f 100644 --- a/ch8/os/task/fn.check_signals_of_current.html +++ b/ch8/os/task/fn.check_signals_of_current.html @@ -4,5 +4,5 @@
pub fn check_signals_of_current() -> Option<(i32, &'static str)>
+

Function os::task::check_signals_of_current

source · []
pub fn check_signals_of_current() -> Option<(i32, &'static str)>
\ No newline at end of file diff --git a/ch8/os/task/fn.current_add_signal.html b/ch8/os/task/fn.current_add_signal.html index f6d0a982..e14e1003 100644 --- a/ch8/os/task/fn.current_add_signal.html +++ b/ch8/os/task/fn.current_add_signal.html @@ -4,5 +4,5 @@
pub fn current_add_signal(signal: SignalFlags)
+

Function os::task::current_add_signal

source · []
pub fn current_add_signal(signal: SignalFlags)
\ No newline at end of file diff --git a/ch8/os/task/fn.exit_current_and_run_next.html b/ch8/os/task/fn.exit_current_and_run_next.html index 2b4c5dc2..835e340e 100644 --- a/ch8/os/task/fn.exit_current_and_run_next.html +++ b/ch8/os/task/fn.exit_current_and_run_next.html @@ -4,5 +4,5 @@
pub fn exit_current_and_run_next(exit_code: i32)
+

Function os::task::exit_current_and_run_next

source · []
pub fn exit_current_and_run_next(exit_code: i32)
\ No newline at end of file diff --git a/ch8/os/task/fn.remove_inactive_task.html b/ch8/os/task/fn.remove_inactive_task.html index 43586573..2129d1b5 100644 --- a/ch8/os/task/fn.remove_inactive_task.html +++ b/ch8/os/task/fn.remove_inactive_task.html @@ -4,5 +4,5 @@
pub fn remove_inactive_task(task: Arc<TaskControlBlock>)
+

Function os::task::remove_inactive_task

source · []
pub fn remove_inactive_task(task: Arc<TaskControlBlock>)
\ No newline at end of file diff --git a/ch8/os/task/index.html b/ch8/os/task/index.html index ee354f5b..9800ec01 100644 --- a/ch8/os/task/index.html +++ b/ch8/os/task/index.html @@ -4,7 +4,7 @@
-

Module os::task

source · []

Re-exports

+

Module os::task

source · []

Re-exports

pub use context::TaskContext;
pub use id::kstack_alloc;
pub use id::pid_alloc;
pub use id::KernelStack;
pub use id::PidHandle;
pub use manager::add_task;
pub use manager::remove_task;
pub use manager::pid2process;
pub use manager::remove_from_pid2process;
pub use processor::current_kstack_top;
pub use processor::current_process;
pub use processor::current_task;
pub use processor::current_trap_cx;
pub use processor::current_trap_cx_user_va;
pub use processor::current_user_token;
pub use processor::run_tasks;
pub use processor::schedule;
pub use processor::take_current_task;
pub use signal::SignalFlags;
pub use task::TaskControlBlock;
pub use task::TaskStatus;

Modules

context 🔒
id 🔒
manager 🔒
process 🔒
processor 🔒
signal 🔒
switch 🔒
task 🔒

Structs

Functions

diff --git a/ch8/os/task/struct.INITPROC.html b/ch8/os/task/struct.INITPROC.html index 5d4f48ee..2b3bb8ed 100644 --- a/ch8/os/task/struct.INITPROC.html +++ b/ch8/os/task/struct.INITPROC.html @@ -4,11 +4,11 @@
-

Struct os::task::INITPROC

source · []
pub struct INITPROC {
+    

Struct os::task::INITPROC

source · []
pub struct INITPROC {
     __private_field: (),
-}

Fields

__private_field: ()

Trait Implementations

The resulting type after dereferencing.

-

Dereferences the value.

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+}

Fields

__private_field: ()

Trait Implementations

The resulting type after dereferencing.

+

Dereferences the value.

+

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

Returns the argument unchanged.

diff --git a/ch8/src/os/task/mod.rs.html b/ch8/src/os/task/mod.rs.html index 443b55e9..30d73261 100644 --- a/ch8/src/os/task/mod.rs.html +++ b/ch8/src/os/task/mod.rs.html @@ -153,6 +153,10 @@ 148 149 150 +151 +152 +153 +154
mod context;
 mod id;
 mod manager;
@@ -248,6 +252,10 @@
             let task = task.as_ref().unwrap();
             // if other tasks are Ready in TaskManager or waiting for a timer to be
             // expired, we should remove them.
+            //
+            // Mention that we do not need to consider Mutex/Semaphore since they
+            // are limited in a single process. Therefore, the blocked tasks are
+            // removed when the PCB is deallocated.
             remove_inactive_task(Arc::clone(&task));
             let mut task_inner = task.inner_exclusive_access();
             if let Some(res) = task_inner.res.take() {