aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/jobs.c
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2015-12-30 03:49:42 -0500
committerBjoern Brandenburg <bbb@mpi-sws.org>2016-03-08 10:12:47 -0500
commit11e71127c200008ec7b904ed9c74c7870efa3849 (patch)
treeda23d8cf92a2d1707539872f01ad5983dc283868 /litmus/jobs.c
parent32784b4fa49490442727c29b4e3b2a75b89bfc69 (diff)
one-shot complete_job(): set completed flag
This could race with a SIGSTOP or some other forced suspension, but we'll let plugins handle this, should they actually care.
Diffstat (limited to 'litmus/jobs.c')
-rw-r--r--litmus/jobs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/litmus/jobs.c b/litmus/jobs.c
index 6199423086f8..250ee8dfd68b 100644
--- a/litmus/jobs.c
+++ b/litmus/jobs.c
@@ -123,12 +123,14 @@ static long sleep_until_next_release(void)
123 123
124 if (lt_after(get_release(t), litmus_clock())) { 124 if (lt_after(get_release(t), litmus_clock())) {
125 set_current_state(TASK_INTERRUPTIBLE); 125 set_current_state(TASK_INTERRUPTIBLE);
126 tsk_rt(t)->completed = 1;
126 preempt_enable_no_resched(); 127 preempt_enable_no_resched();
127 err = schedule_hrtimeout(&next_release, HRTIMER_MODE_ABS); 128 err = schedule_hrtimeout(&next_release, HRTIMER_MODE_ABS);
128 /* If we get woken by a signal, we return early. 129 /* If we get woken by a signal, we return early.
129 * This is intentional; we want to be able to kill tasks 130 * This is intentional; we want to be able to kill tasks
130 * that are waiting for the next job release. 131 * that are waiting for the next job release.
131 */ 132 */
133 tsk_rt(t)->completed = 0;
132 } else { 134 } else {
133 err = 0; 135 err = 0;
134 TRACE_CUR("TARDY: release=%llu now=%llu\n", get_release(t), litmus_clock()); 136 TRACE_CUR("TARDY: release=%llu now=%llu\n", get_release(t), litmus_clock());