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.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/include/litmus/locking.h b/include/litmus/locking.h
index 962ad5e6726a..08b06200b955 100644
--- a/include/litmus/locking.h
+++ b/include/litmus/locking.h
@@ -120,6 +120,12 @@ typedef lock_op_t lock_unlock_t;
120typedef int (*lock_open_t)(struct litmus_lock *l, void* __user arg); 120typedef int (*lock_open_t)(struct litmus_lock *l, void* __user arg);
121typedef void (*lock_free_t)(struct litmus_lock *l); 121typedef void (*lock_free_t)(struct litmus_lock *l);
122 122
123#ifdef CONFIG_LITMUS_NESTED_LOCKING
124/* Assumes task's base-priority already updated to reflect new priority. */
125typedef void (*lock_budget_exhausted_t)(struct litmus_lock* l, struct task_struct* t);
126typedef void (*lock_omlp_virtual_unlock_t)(struct litmus_lock* l, struct task_struct* t);
127#endif
128
123struct litmus_lock_ops { 129struct litmus_lock_ops {
124 /* Current task tries to obtain / drop a reference to a lock. 130 /* Current task tries to obtain / drop a reference to a lock.
125 * Optional methods, allowed by default. */ 131 * Optional methods, allowed by default. */
@@ -133,10 +139,12 @@ struct litmus_lock_ops {
133 /* The lock is no longer being referenced (mandatory method). */ 139 /* The lock is no longer being referenced (mandatory method). */
134 lock_free_t deallocate; 140 lock_free_t deallocate;
135 141
136
137#ifdef CONFIG_LITMUS_NESTED_LOCKING 142#ifdef CONFIG_LITMUS_NESTED_LOCKING
143 lock_budget_exhausted_t budget_exhausted;
144 lock_omlp_virtual_unlock_t omlp_virtual_unlock;
145
138 void (*propagate_increase_inheritance)(struct litmus_lock* l, struct task_struct* t, raw_spinlock_t* to_unlock, unsigned long irqflags); 146 void (*propagate_increase_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); 147 void (*propagate_decrease_inheritance)(struct litmus_lock* l, struct task_struct* t, raw_spinlock_t* to_unlock, unsigned long irqflags, int budget_triggered);
140#endif 148#endif
141#ifdef CONFIG_LITMUS_DGL_SUPPORT 149#ifdef CONFIG_LITMUS_DGL_SUPPORT
142 raw_spinlock_t* (*get_dgl_spin_lock)(struct litmus_lock *l); 150 raw_spinlock_t* (*get_dgl_spin_lock)(struct litmus_lock *l);
@@ -151,6 +159,9 @@ struct litmus_lock_ops {
151#endif 159#endif
152 160
153 /* all flags at the end */ 161 /* all flags at the end */
162 unsigned int supports_budget_exhaustion:1;
163 unsigned int is_omlp_family:1;
164
154#ifdef CONFIG_LITMUS_NESTED_LOCKING 165#ifdef CONFIG_LITMUS_NESTED_LOCKING
155 unsigned int supports_nesting:1; 166 unsigned int supports_nesting:1;
156#endif 167#endif