aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus/reservations/table-driven.h
blob: b6302a2f200d1b3feddc4ecf8a064d5b4e5ce5d3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef LITMUS_RESERVATIONS_TABLE_DRIVEN_H
#define LITMUS_RESERVATIONS_TABLE_DRIVEN_H

#include <litmus/reservations/reservation.h>

struct table_driven_reservation {
	/* extend basic reservation */
	struct reservation res;

	lt_t major_cycle;
	unsigned int next_interval;
	unsigned int num_intervals;
	struct lt_interval *intervals;

	/* info about current scheduling slot */
	struct lt_interval cur_interval;
	lt_t major_cycle_start;
};

void table_driven_reservation_init(struct table_driven_reservation *tdres,
	lt_t major_cycle, struct lt_interval *intervals, unsigned int num_intervals);

#endif