diff options
Diffstat (limited to 'litmus/jobs.c')
-rw-r--r-- | litmus/jobs.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/litmus/jobs.c b/litmus/jobs.c index bc8246572e54..9fe4eb1fa168 100644 --- a/litmus/jobs.c +++ b/litmus/jobs.c | |||
@@ -13,6 +13,8 @@ static inline void setup_release(struct task_struct *t, lt_t release) | |||
13 | t->rt_param.job_params.deadline = release + get_rt_relative_deadline(t); | 13 | t->rt_param.job_params.deadline = release + get_rt_relative_deadline(t); |
14 | t->rt_param.job_params.exec_time = 0; | 14 | t->rt_param.job_params.exec_time = 0; |
15 | 15 | ||
16 | clear_bit(RT_JOB_SIG_BUDGET_SENT, &t->rt_param.job_params.flags); | ||
17 | |||
16 | /* update job sequence number */ | 18 | /* update job sequence number */ |
17 | t->rt_param.job_params.job_no++; | 19 | t->rt_param.job_params.job_no++; |
18 | 20 | ||
@@ -23,6 +25,14 @@ static inline void setup_release(struct task_struct *t, lt_t release) | |||
23 | void prepare_for_next_period(struct task_struct *t) | 25 | void prepare_for_next_period(struct task_struct *t) |
24 | { | 26 | { |
25 | BUG_ON(!t); | 27 | BUG_ON(!t); |
28 | |||
29 | /* Record lateness before we set up the next job's | ||
30 | * release and deadline. Lateness may be negative. | ||
31 | */ | ||
32 | t->rt_param.job_params.lateness = | ||
33 | (long long)litmus_clock() - | ||
34 | (long long)t->rt_param.job_params.deadline; | ||
35 | |||
26 | setup_release(t, get_release(t) + get_rt_period(t)); | 36 | setup_release(t, get_release(t) + get_rt_period(t)); |
27 | } | 37 | } |
28 | 38 | ||