diff options
Diffstat (limited to 'litmus/sched_gsn_edf.c')
-rw-r--r-- | litmus/sched_gsn_edf.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/litmus/sched_gsn_edf.c b/litmus/sched_gsn_edf.c index ed9b4697a5a2..04b189e54b03 100644 --- a/litmus/sched_gsn_edf.c +++ b/litmus/sched_gsn_edf.c | |||
@@ -1050,7 +1050,7 @@ static void gsnedf_task_wake_up(struct task_struct *task) | |||
1050 | #endif | 1050 | #endif |
1051 | 1051 | ||
1052 | #ifdef CONFIG_REALTIME_AUX_TASKS | 1052 | #ifdef CONFIG_REALTIME_AUX_TASKS |
1053 | if (tsk_rt(task)->has_aux_tasks) { | 1053 | if (tsk_rt(task)->has_aux_tasks && !tsk_rt(task)->hide_from_aux_tasks) { |
1054 | TRACE_CUR("%s/%d is ready so aux tasks may not inherit.\n", task->comm, task->pid); | 1054 | TRACE_CUR("%s/%d is ready so aux tasks may not inherit.\n", task->comm, task->pid); |
1055 | disable_aux_task_owner(task); | 1055 | disable_aux_task_owner(task); |
1056 | } | 1056 | } |
@@ -1072,7 +1072,7 @@ static void gsnedf_task_block(struct task_struct *t) | |||
1072 | unlink(t); | 1072 | unlink(t); |
1073 | 1073 | ||
1074 | #ifdef CONFIG_REALTIME_AUX_TASKS | 1074 | #ifdef CONFIG_REALTIME_AUX_TASKS |
1075 | if (tsk_rt(t)->has_aux_tasks) { | 1075 | if (tsk_rt(t)->has_aux_tasks && !tsk_rt(t)->hide_from_aux_tasks) { |
1076 | 1076 | ||
1077 | TRACE_CUR("%s/%d is blocked so aux tasks may inherit.\n", t->comm, t->pid); | 1077 | TRACE_CUR("%s/%d is blocked so aux tasks may inherit.\n", t->comm, t->pid); |
1078 | enable_aux_task_owner(t); | 1078 | enable_aux_task_owner(t); |
@@ -1093,19 +1093,16 @@ static void gsnedf_task_exit(struct task_struct * t) | |||
1093 | gsnedf_change_prio_pai_tasklet(t, NULL); | 1093 | gsnedf_change_prio_pai_tasklet(t, NULL); |
1094 | #endif | 1094 | #endif |
1095 | 1095 | ||
1096 | #ifdef CONFIG_REALTIME_AUX_TASKS | ||
1097 | if (tsk_rt(t)->is_aux_task) { | ||
1098 | exit_aux_task(t); /* cannot be called with gsnedf_lock held */ | ||
1099 | } | ||
1100 | #endif | ||
1101 | |||
1102 | /* unlink if necessary */ | 1096 | /* unlink if necessary */ |
1103 | raw_spin_lock_irqsave(&gsnedf_lock, flags); | 1097 | raw_spin_lock_irqsave(&gsnedf_lock, flags); |
1104 | 1098 | ||
1105 | #ifdef CONFIG_REALTIME_AUX_TASKS | 1099 | #ifdef CONFIG_REALTIME_AUX_TASKS |
1106 | /* make sure we clean up on our way out */ | 1100 | /* make sure we clean up on our way out */ |
1107 | if(tsk_rt(t)->has_aux_tasks) { | 1101 | if (unlikely(tsk_rt(t)->is_aux_task)) { |
1108 | disable_aux_task_owner(t); /* must be called witl gsnedf_lock held */ | 1102 | exit_aux_task(t); |
1103 | } | ||
1104 | else if(tsk_rt(t)->has_aux_tasks) { | ||
1105 | disable_aux_task_owner(t); | ||
1109 | } | 1106 | } |
1110 | #endif | 1107 | #endif |
1111 | 1108 | ||
@@ -1664,7 +1661,7 @@ int gsnedf_fmlp_lock(struct litmus_lock* l) | |||
1664 | * there is only one wake up per release. | 1661 | * there is only one wake up per release. |
1665 | */ | 1662 | */ |
1666 | 1663 | ||
1667 | schedule(); | 1664 | suspend_for_lock(); |
1668 | 1665 | ||
1669 | TS_LOCK_RESUME; | 1666 | TS_LOCK_RESUME; |
1670 | 1667 | ||