#ifndef LITMUS_TD_RESERVATION_H #define LITMUS_TD_RESERVATION_H #include /* ************************************************************************** */ struct mtd_reservation { struct ext_reservation res[NR_CPUS]; lt_t major_cycle; unsigned int interval_index[NR_CPUS]; unsigned int num_intervals[NR_CPUS]; struct lt_interval* intervals[NR_CPUS]; struct lt_interval cur_interval[NR_CPUS]; lt_t major_cycle_start[NR_CPUS]; }; long mtd_res_install_table( struct mtd_reservation* mtd_res, struct lt_interval* intervals, lt_t major_cycle, unsigned int num_intervals, int cpu ); long alloc_mtd_reservation( struct mtd_reservation** _res, unsigned int id, lt_t major_cycle ); struct mtd_cpu_entry { int id; struct ext_reservation* scheduled; struct ext_reservation* linked; rt_domain_t domain; }; /* environment for scheduling reservations via gedf */ struct mtd_reservation_environment { struct ext_reservation_environment env; /* max number of cpus in environment */ int max_cpus; /* array of gedf cpu entries */ struct mtd_cpu_entry* cpu_entries; raw_spinlock_t insert_lock; }; long alloc_mtd_reservation_environment( struct mtd_reservation_environment** _env, int max_cpus ); #endif