diff options
| author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-04-12 15:17:26 -0400 |
|---|---|---|
| committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-04-12 15:17:26 -0400 |
| commit | 4ffefb822b9d65d4efbedb60e3c9a0e76895cc5b (patch) | |
| tree | 905444d931d01e59a8bd1b06a1e9e88b89a05377 /include | |
| parent | f4ffe0719dfc150ee182f308d31a226b034f206b (diff) | |
Changed completion flag use to remove race condition in Cedf,Gedf.
Diffstat (limited to 'include')
| -rw-r--r-- | include/litmus/budget.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/litmus/budget.h b/include/litmus/budget.h index 33344ee8d5f9..c4e9e40a828e 100644 --- a/include/litmus/budget.h +++ b/include/litmus/budget.h | |||
| @@ -29,7 +29,7 @@ static inline int requeue_preempted_job(struct task_struct* t) | |||
| 29 | /* Add task to ready queue only if not subject to budget enforcement or | 29 | /* Add task to ready queue only if not subject to budget enforcement or |
| 30 | * if the job has budget remaining. t may be NULL. | 30 | * if the job has budget remaining. t may be NULL. |
| 31 | */ | 31 | */ |
| 32 | return t && (!budget_exhausted(t) || !budget_enforced(t)); | 32 | return t && !is_completed(t) && (!budget_exhausted(t) || !budget_enforced(t)); |
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | #endif | 35 | #endif |
