aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus/polling_reservations.h
blob: 66c9b1e31f203ecae28bee0281dfbc8eb5cd8d34 (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
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef LITMUS_POLLING_RESERVATIONS_H
#define LITMUS_POLLING_RESERVATIONS_H

#include <litmus/reservation.h>

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

	lt_t max_budget;
	lt_t period;
	lt_t deadline;
	lt_t offset;
};

void polling_reservation_init(struct polling_reservation *pres, int use_edf_prio,
	int use_periodic_polling, lt_t budget, lt_t period, lt_t deadline, lt_t offset);

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