From 11e71127c200008ec7b904ed9c74c7870efa3849 Mon Sep 17 00:00:00 2001 From: Bjoern Brandenburg Date: Wed, 30 Dec 2015 09:49:42 +0100 Subject: 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. --- litmus/jobs.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'litmus') 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) if (lt_after(get_release(t), litmus_clock())) { set_current_state(TASK_INTERRUPTIBLE); + tsk_rt(t)->completed = 1; preempt_enable_no_resched(); err = schedule_hrtimeout(&next_release, HRTIMER_MODE_ABS); /* If we get woken by a signal, we return early. * This is intentional; we want to be able to kill tasks * that are waiting for the next job release. */ + tsk_rt(t)->completed = 0; } else { err = 0; TRACE_CUR("TARDY: release=%llu now=%llu\n", get_release(t), litmus_clock()); -- cgit v1.2.2