robert-w-gries / rxinu

Rust implementation of Xinu educational operating system
Apache License 2.0
34 stars 4 forks source link

Make scheduling components generic to support either Processes or Threads #70

Closed robert-w-gries closed 3 years ago

robert-w-gries commented 6 years ago

There should be a trait, Task, that is implemented by both Process and Thread.

This will be useful to re-use schedulers and synchronization primitives.

Example:

pub struct Semaphore<T> where T: Task {
    wait_queue: VecDeque<T>,
}