aboutsummaryrefslogtreecommitdiffstats
path: root/ipc/sem.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipc/sem.c')
-rw-r--r--ipc/sem.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ipc/sem.c b/ipc/sem.c
index 5e318c5f749d..ec9203971539 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -712,6 +712,13 @@ undo:
static void wake_up_sem_queue_prepare(struct list_head *pt,
struct sem_queue *q, int error)
{
+#ifdef CONFIG_PREEMPT_RT_BASE
+ struct task_struct *p = q->sleeper;
+ get_task_struct(p);
+ q->status = error;
+ wake_up_process(p);
+ put_task_struct(p);
+#else
if (list_empty(pt)) {
/*
* Hold preempt off so that we don't get preempted and have the
@@ -723,6 +730,7 @@ static void wake_up_sem_queue_prepare(struct list_head *pt,
q->pid = error;
list_add_tail(&q->list, pt);
+#endif
}
/**
@@ -736,6 +744,7 @@ static void wake_up_sem_queue_prepare(struct list_head *pt,
*/
static void wake_up_sem_queue_do(struct list_head *pt)
{
+#ifndef CONFIG_PREEMPT_RT_BASE
struct sem_queue *q, *t;
int did_something;
@@ -748,6 +757,7 @@ static void wake_up_sem_queue_do(struct list_head *pt)
}
if (did_something)
preempt_enable();
+#endif
}
static void unlink_queue(struct sem_array *sma, struct sem_queue *q)