Skip to content
Snippets Groups Projects
Commit 3138e1f1 authored by Ruben Asplund's avatar Ruben Asplund
Browse files

Moved TaskData struct to common.rs

parent 7d3e7f55
No related branches found
No related tags found
No related merge requests found
use crate::common::*; use crate::common::*;
use std::collections::HashSet; use std::collections::HashSet;
#[derive(Debug, Clone)]
pub struct TaskData {
pub task: Task,
pub response_time: u32,
pub wcet: u32,
pub blocking_time: u32,
pub preemption_time: u32
}
// Prints out vector with [task id, response time, wcet time, blocking time, preemption time] // Prints out vector with [task id, response time, wcet time, blocking time, preemption time]
pub fn analysis(tasks: &Tasks, exact: bool) -> Vec<TaskData>{ pub fn analysis(tasks: &Tasks, exact: bool) -> Vec<TaskData>{
let mut analysis: Vec<TaskData> = vec!(); let mut analysis: Vec<TaskData> = vec!();
......
use std::collections::{HashMap, HashSet}; use std::collections::{HashMap, HashSet};
// common data structures #[derive(Debug, Clone)]
pub struct TaskData {
pub task: Task,
pub response_time: u32,
pub wcet: u32,
pub blocking_time: u32,
pub preemption_time: u32
}
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub struct Task { pub struct Task {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment