forked from Rativel/BurritOS
lint: remove some warning
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use std::{rc::Rc, cell::RefCell};
|
||||
|
||||
use super::{process::Process, system::ObjectType};
|
||||
use super::process::Process;
|
||||
use crate::{simulator::machine::{NUM_INT_REGS, NUM_FP_REGS, STACK_REG}};
|
||||
|
||||
const STACK_FENCEPOST: u32 = 0xdeadbeef;
|
||||
@@ -27,7 +27,6 @@ pub struct Thread {
|
||||
pub process: Option<Rc<RefCell<Process>>>,
|
||||
pub thread_context: ThreadContext,
|
||||
pub stack_pointer: i32,
|
||||
object_type: ObjectType
|
||||
}
|
||||
|
||||
impl Thread {
|
||||
@@ -44,7 +43,6 @@ impl Thread {
|
||||
pc: 0
|
||||
},
|
||||
stack_pointer: 0,
|
||||
object_type: ObjectType::ThreadType,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,23 +74,10 @@ impl Thread {
|
||||
|
||||
}
|
||||
|
||||
impl Drop for Thread {
|
||||
|
||||
fn drop(&mut self) {
|
||||
self.object_type = ObjectType::InvalidType;
|
||||
// todo!();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fn start_thread_execution() {
|
||||
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
|
||||
use super::{Thread, ThreadContext, NUM_INT_REGS, NUM_FP_REGS, ObjectType};
|
||||
use super::{Thread, ThreadContext, NUM_INT_REGS, NUM_FP_REGS};
|
||||
const DEFAULT_THREAD_NAME: &str = "test_thread";
|
||||
|
||||
/// This macro allows for getting a Thread for which we've ensured proper initial state
|
||||
@@ -110,7 +95,6 @@ mod test {
|
||||
pc: 0
|
||||
};
|
||||
x.stack_pointer = 0;
|
||||
x.object_type = ObjectType::ThreadType;
|
||||
x }
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user