X-Git-Url: https://rtime.felk.cvut.cz/gitweb/zynq/linux.git/blobdiff_plain/b450e900fdb473a53613ad014f31eedbc80b1c90..aebcc440d27130c7bfb8868bc7246698e76d5f45:/ipc/sem.c diff --git a/ipc/sem.c b/ipc/sem.c index 10b94bc59d4a..b8360eaacc7a 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)