From 9199c609489ab6d6dcb12c3b12c4fa531566a6bf Mon Sep 17 00:00:00 2001 From: Julien CLEMENT Date: Thu, 29 Dec 2022 18:58:48 +0100 Subject: [PATCH] create thread and scheduler base files Signed-off-by: Julien CLEMENT --- src/lib.rs | 1 + src/proc/mod.rs | 2 ++ src/proc/scheduler/mod.rs | 7 +++++++ src/proc/thread/mod.rs | 3 +++ 4 files changed, 13 insertions(+) create mode 100644 src/proc/mod.rs create mode 100644 src/proc/scheduler/mod.rs create mode 100644 src/proc/thread/mod.rs diff --git a/src/lib.rs b/src/lib.rs index de964ea..8430153 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,6 +8,7 @@ mod fd; mod fs; mod interrupts; mod memory; +mod proc; mod syscalls; mod task; mod utils; diff --git a/src/proc/mod.rs b/src/proc/mod.rs new file mode 100644 index 0000000..5e8e105 --- /dev/null +++ b/src/proc/mod.rs @@ -0,0 +1,2 @@ +pub mod thread; +pub mod scheduler; \ No newline at end of file diff --git a/src/proc/scheduler/mod.rs b/src/proc/scheduler/mod.rs new file mode 100644 index 0000000..10d3957 --- /dev/null +++ b/src/proc/scheduler/mod.rs @@ -0,0 +1,7 @@ +use super::thread::Thread; + +use alloc::vec::Vec; + +pub struct Scheduler { + threads: Vec, +} \ No newline at end of file diff --git a/src/proc/thread/mod.rs b/src/proc/thread/mod.rs new file mode 100644 index 0000000..78fba03 --- /dev/null +++ b/src/proc/thread/mod.rs @@ -0,0 +1,3 @@ +pub struct Thread { + rsp: u64 +} \ No newline at end of file