aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/sched_gsn_edf.c
diff options
context:
space:
mode:
authorNathan O <otternes@cs.unc.edu>2019-12-10 21:33:28 -0500
committerNathan O <otternes@cs.unc.edu>2019-12-10 21:33:28 -0500
commitec01ea7a3f09d246ab322f828d6c66b2704be485 (patch)
tree3af9aa035550ccb5ea2eec9c321cbb576b1fc71a /litmus/sched_gsn_edf.c
parent3c4abebc788e9d92d776d7bc8b778f398cdb4010 (diff)
Fix remaining compilation problems
- This change addresses additional changes that are needed to LITMUS code so that the kernel is able to compile. - The kernel is now able to compile. - I will probably squash this commit with the previous commit sometime later, so that all of the LITMUS-updating changes are in one commit and easy to see, *if* this kernel works.
Diffstat (limited to 'litmus/sched_gsn_edf.c')
-rw-r--r--litmus/sched_gsn_edf.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/litmus/sched_gsn_edf.c b/litmus/sched_gsn_edf.c
index 8f28dc4e5192..12316b4e0663 100644
--- a/litmus/sched_gsn_edf.c
+++ b/litmus/sched_gsn_edf.c
@@ -12,6 +12,8 @@
12#include <linux/percpu.h> 12#include <linux/percpu.h>
13#include <linux/sched.h> 13#include <linux/sched.h>
14#include <linux/slab.h> 14#include <linux/slab.h>
15#include <linux/sched/topology.h>
16#include <linux/wait.h>
15 17
16#include <litmus/debug_trace.h> 18#include <litmus/debug_trace.h>
17#include <litmus/litmus.h> 19#include <litmus/litmus.h>
@@ -744,9 +746,9 @@ struct task_struct* find_hp_waiter(struct fmlp_semaphore *sem,
744 struct list_head *pos; 746 struct list_head *pos;
745 struct task_struct *queued, *found = NULL; 747 struct task_struct *queued, *found = NULL;
746 748
747 list_for_each(pos, &sem->wait.task_list) { 749 list_for_each(pos, &sem->wait.head) {
748 queued = (struct task_struct*) list_entry(pos, wait_queue_t, 750 queued = (struct task_struct*) list_entry(pos,
749 task_list)->private; 751 wait_queue_entry_t, entry)->private;
750 752
751 /* Compare task prios, find high prio task. */ 753 /* Compare task prios, find high prio task. */
752 if (queued != skip && edf_higher_prio(queued, found)) 754 if (queued != skip && edf_higher_prio(queued, found))
@@ -759,7 +761,7 @@ int gsnedf_fmlp_lock(struct litmus_lock* l)
759{ 761{
760 struct task_struct* t = current; 762 struct task_struct* t = current;
761 struct fmlp_semaphore *sem = fmlp_from_lock(l); 763 struct fmlp_semaphore *sem = fmlp_from_lock(l);
762 wait_queue_t wait; 764 wait_queue_entry_t wait;
763 unsigned long flags; 765 unsigned long flags;
764 766
765 if (!is_realtime(t)) 767 if (!is_realtime(t))
@@ -777,9 +779,10 @@ int gsnedf_fmlp_lock(struct litmus_lock* l)
777 init_waitqueue_entry(&wait, t); 779 init_waitqueue_entry(&wait, t);
778 780
779 /* FIXME: interruptible would be nice some day */ 781 /* FIXME: interruptible would be nice some day */
780 set_task_state(t, TASK_UNINTERRUPTIBLE); 782 set_current_state(TASK_UNINTERRUPTIBLE);
781 783
782 __add_wait_queue_tail_exclusive(&sem->wait, &wait); 784 wait.flags |= WQ_FLAG_EXCLUSIVE;
785 __add_wait_queue_entry_tail(&sem->wait, &wait);
783 786
784 /* check if we need to activate priority inheritance */ 787 /* check if we need to activate priority inheritance */
785 if (edf_higher_prio(t, sem->hp_waiter)) { 788 if (edf_higher_prio(t, sem->hp_waiter)) {