Remove change I am faaairly certain I did NOT add :O

I'm guessing it's some issue after a rebase or something...
This commit is contained in:
jD91mZM2
2019-07-01 22:50:19 +00:00
committed by Jeremy Soller
parent 42f977e7da
commit effe02bd45
16 changed files with 881 additions and 181 deletions
+14 -2
View File
@@ -7,15 +7,16 @@ use core::cmp::Ordering;
use core::mem;
use spin::Mutex;
use crate::arch::paging::PAGE_SIZE;
use crate::arch::{macros::InterruptStack, paging::PAGE_SIZE};
use crate::common::unique::Unique;
use crate::context::arch;
use crate::context::file::FileDescriptor;
use crate::context::memory::{Grant, Memory, SharedMemory, Tls};
use crate::ipi::{ipi, IpiKind, IpiTarget};
use crate::scheme::{SchemeNamespace, FileHandle};
use crate::sync::WaitMap;
use crate::syscall::data::SigAction;
use crate::syscall::flag::SIG_DFL;
use crate::sync::WaitMap;
/// Unique identifier for a context (i.e. `pid`).
use ::core::sync::atomic::AtomicUsize;
@@ -165,6 +166,15 @@ pub struct Context {
pub files: Arc<Mutex<Vec<Option<FileDescriptor>>>>,
/// Signal actions
pub actions: Arc<Mutex<Vec<(SigAction, usize)>>>,
/// The pointer to the user-space registers, saved after certain
/// interrupts. This pointer is somewhere inside kstack, and the
/// kstack address at the time of creation is the first element in
/// this tuple.
pub regs: Option<(usize, Unique<InterruptStack>)>,
/// A somewhat hacky way to initially stop a context when creating
/// a new instance of the proc: scheme, entirely separate from
/// signals or any other way to restart a process.
pub ptrace_stop: bool
}
impl Context {
@@ -216,6 +226,8 @@ impl Context {
},
0
); 128])),
regs: None,
ptrace_stop: false
}
}
+1 -1
View File
@@ -55,7 +55,7 @@ unsafe fn update(context: &mut Context, cpu_id: usize) {
unsafe fn runnable(context: &Context, cpu_id: usize) -> bool {
// Switch to context if it needs to run, is not currently running, and is owned by the current CPU
!context.running && context.status == Status::Runnable && context.cpu_id == Some(cpu_id)
!context.running && !context.ptrace_stop && context.status == Status::Runnable && context.cpu_id == Some(cpu_id)
}
/// Switch to the next context