aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus/locking.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/litmus/locking.h')
-rw-r--r--include/litmus/locking.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/include/litmus/locking.h b/include/litmus/locking.h
index b1024e397f67..fc437811d2b6 100644
--- a/include/litmus/locking.h
+++ b/include/litmus/locking.h
@@ -11,7 +11,6 @@ struct nested_info
11 struct litmus_lock *lock; 11 struct litmus_lock *lock;
12 struct task_struct *hp_waiter_eff_prio; 12 struct task_struct *hp_waiter_eff_prio;
13 struct task_struct **hp_waiter_ptr; 13 struct task_struct **hp_waiter_ptr;
14// struct task_struct **owner_ptr;
15 struct binheap_node hp_binheap_node; 14 struct binheap_node hp_binheap_node;
16}; 15};
17 16
@@ -134,24 +133,31 @@ struct litmus_lock_ops {
134 /* The lock is no longer being referenced (mandatory method). */ 133 /* The lock is no longer being referenced (mandatory method). */
135 lock_free_t deallocate; 134 lock_free_t deallocate;
136 135
137 136
138#ifdef CONFIG_LITMUS_NESTED_LOCKING 137#ifdef CONFIG_LITMUS_NESTED_LOCKING
139 void (*propagate_increase_inheritance)(struct litmus_lock* l, struct task_struct* t, raw_spinlock_t* to_unlock, unsigned long irqflags); 138 void (*propagate_increase_inheritance)(struct litmus_lock* l, struct task_struct* t, raw_spinlock_t* to_unlock, unsigned long irqflags);
140 void (*propagate_decrease_inheritance)(struct litmus_lock* l, struct task_struct* t, raw_spinlock_t* to_unlock, unsigned long irqflags); 139 void (*propagate_decrease_inheritance)(struct litmus_lock* l, struct task_struct* t, raw_spinlock_t* to_unlock, unsigned long irqflags);
141#endif 140#endif
142
143
144#ifdef CONFIG_LITMUS_DGL_SUPPORT 141#ifdef CONFIG_LITMUS_DGL_SUPPORT
145 raw_spinlock_t* (*get_dgl_spin_lock)(struct litmus_lock *l); 142 raw_spinlock_t* (*get_dgl_spin_lock)(struct litmus_lock *l);
146 int (*dgl_lock)(struct litmus_lock *l, dgl_wait_state_t* dgl_wait, wait_queue_t* wq_node); 143 int (*dgl_lock)(struct litmus_lock *l, dgl_wait_state_t* dgl_wait, wait_queue_t* wq_node);
147 int (*is_owner)(struct litmus_lock *l, struct task_struct *t); 144 int (*is_owner)(struct litmus_lock *l, struct task_struct *t);
148 struct task_struct* (*get_owner)(struct litmus_lock *l); 145 struct task_struct* (*get_owner)(struct litmus_lock *l);
149 void (*enable_priority)(struct litmus_lock *l, dgl_wait_state_t* dgl_wait); 146 void (*enable_priority)(struct litmus_lock *l, dgl_wait_state_t* dgl_wait);
150 147
151 int (*dgl_can_quick_lock)(struct litmus_lock *l, struct task_struct *t); 148 int (*dgl_can_quick_lock)(struct litmus_lock *l, struct task_struct *t);
152 void (*dgl_quick_lock)(struct litmus_lock *l, struct litmus_lock *cur_lock, 149 void (*dgl_quick_lock)(struct litmus_lock *l, struct litmus_lock *cur_lock,
153 struct task_struct* t, wait_queue_t *q); 150 struct task_struct* t, wait_queue_t *q);
154#endif 151#endif
152
153 /* all flags at the end */
154#ifdef CONFIG_LITMUS_NESTED_LOCKING
155 int supports_nesting:1;
156#endif
157#ifdef CONFIG_LITMUS_DGL_SUPPORT
158 int supports_dgl:1;
159 int requires_atomic_dgl:1;
160#endif
155}; 161};
156 162
157 163