aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/ikglp_lock.c
diff options
context:
space:
mode:
Diffstat (limited to 'litmus/ikglp_lock.c')
-rw-r--r--litmus/ikglp_lock.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/litmus/ikglp_lock.c b/litmus/ikglp_lock.c
index 2b50fb1c05fd..b95a1def33a3 100644
--- a/litmus/ikglp_lock.c
+++ b/litmus/ikglp_lock.c
@@ -1185,6 +1185,13 @@ int ikglp_unlock(struct litmus_lock* l)
1185 1185
1186 int err = 0; 1186 int err = 0;
1187 1187
1188 fq = ikglp_get_queue(sem, t); // returns NULL if 't' is not owner.
1189
1190 if (!fq) {
1191 err = -EINVAL;
1192 goto out;
1193 }
1194
1188#ifdef CONFIG_LITMUS_DGL_SUPPORT 1195#ifdef CONFIG_LITMUS_DGL_SUPPORT
1189 dgl_lock = litmus->get_dgl_spinlock(t); 1196 dgl_lock = litmus->get_dgl_spinlock(t);
1190#endif 1197#endif
@@ -1193,14 +1200,6 @@ int ikglp_unlock(struct litmus_lock* l)
1193 lock_global_irqsave(dgl_lock, flags); // TODO: Push this deeper 1200 lock_global_irqsave(dgl_lock, flags); // TODO: Push this deeper
1194 lock_fine_irqsave(&sem->lock, flags); 1201 lock_fine_irqsave(&sem->lock, flags);
1195 1202
1196
1197 fq = ikglp_get_queue(sem, t); // returns NULL if 't' is not owner.
1198
1199 if (!fq) {
1200 err = -EINVAL;
1201 goto out;
1202 }
1203
1204 TRACE_TASK(t, "Freeing replica %d.\n", ikglp_get_idx(sem, fq)); 1203 TRACE_TASK(t, "Freeing replica %d.\n", ikglp_get_idx(sem, fq));
1205 1204
1206 1205