Changed naming of things to match Rust's conventions
This commit is contained in:
parent
7492cef2fc
commit
d687fd4e39
|
@ -10,7 +10,7 @@ use crate::{
|
||||||
pub fn init() {
|
pub fn init() {
|
||||||
use crate::{
|
use crate::{
|
||||||
network::socket::SimpleSock, relib::network::socket::Socket,
|
network::socket::SimpleSock, relib::network::socket::Socket,
|
||||||
scheduler::priority::Priority::High, stdio::StdIO,
|
scheduler::priority::Priority::High, stdio::StdIo,
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut log_socket_id = SimpleSock::new();
|
let mut log_socket_id = SimpleSock::new();
|
||||||
|
@ -31,7 +31,7 @@ pub fn init() {
|
||||||
Capabilities::empty(),
|
Capabilities::empty(),
|
||||||
High,
|
High,
|
||||||
"".to_string(),
|
"".to_string(),
|
||||||
StdIO::new("null".to_string()),
|
StdIo::new("null".to_string()),
|
||||||
);
|
);
|
||||||
scheduler.add_process(process_0);
|
scheduler.add_process(process_0);
|
||||||
drop(scheduler);
|
drop(scheduler);
|
||||||
|
|
|
@ -3,7 +3,7 @@ pub mod priority;
|
||||||
pub mod proc;
|
pub mod proc;
|
||||||
|
|
||||||
use crate::scheduler::capabilities::Capabilities;
|
use crate::scheduler::capabilities::Capabilities;
|
||||||
use crate::{arch::generate_process_pass, stdio::StdIO};
|
use crate::{arch::generate_process_pass, stdio::StdIo};
|
||||||
use kernel::proccess::PID;
|
use kernel::proccess::PID;
|
||||||
use priority::Priority;
|
use priority::Priority;
|
||||||
use proc::Process;
|
use proc::Process;
|
||||||
|
@ -70,7 +70,7 @@ impl Scheduler {
|
||||||
capabilities: Capabilities,
|
capabilities: Capabilities,
|
||||||
priority: Priority,
|
priority: Priority,
|
||||||
working_dir: String,
|
working_dir: String,
|
||||||
stdio: StdIO,
|
stdio: StdIo,
|
||||||
) -> Process {
|
) -> Process {
|
||||||
Process {
|
Process {
|
||||||
pid: 0,
|
pid: 0,
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
use super::capabilities::Capabilities;
|
use super::capabilities::Capabilities;
|
||||||
use super::priority::Priority;
|
use super::priority::Priority;
|
||||||
use crate::stdio::StdIO;
|
use crate::stdio::StdIo;
|
||||||
use kernel::proccess::PID;
|
use kernel::proccess::PID;
|
||||||
|
|
||||||
/// A process
|
/// A process
|
||||||
|
@ -20,5 +20,5 @@ pub struct Process {
|
||||||
|
|
||||||
/// A process's current working directory
|
/// A process's current working directory
|
||||||
pub working_dir: String,
|
pub working_dir: String,
|
||||||
pub stdio: StdIO,
|
pub stdio: StdIo,
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,13 +5,13 @@ use {
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct StdIO {
|
pub struct StdIo {
|
||||||
device: String,
|
device: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl StdIO {
|
impl StdIo {
|
||||||
pub fn new(device: String) -> StdIO {
|
pub fn new(device: String) -> StdIo {
|
||||||
StdIO { device }
|
StdIo { device }
|
||||||
}
|
}
|
||||||
pub fn write(&mut self, args: Arguments) -> Result<(), Error> {
|
pub fn write(&mut self, args: Arguments) -> Result<(), Error> {
|
||||||
use crate::devices::DEVICE_TABLE;
|
use crate::devices::DEVICE_TABLE;
|
||||||
|
|
Loading…
Reference in a new issue