diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-07-03 13:30:12 (GMT) |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2015-02-13 22:20:27 (GMT) |
commit | b0c9323c7fbd3447ea90d26a1e2e269138730cfe (patch) | |
tree | 88021b1c42488f0ac27a8009a3adfb26033e181a /ipc/mqueue.c | |
parent | 8c269ba0633cb099a203754283afe0f7940d8d86 (diff) | |
download | linux-fsl-qoriq-b0c9323c7fbd3447ea90d26a1e2e269138730cfe.tar.xz |
ipc: Make the ipc code -rt aware
RT serializes the code with the (rt)spinlock but keeps preemption
enabled. Some parts of the code need to be atomic nevertheless.
Protect it with preempt_disable/enable_rt pairts.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'ipc/mqueue.c')
-rw-r--r-- | ipc/mqueue.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c index bb0248f..af0c6bb 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c @@ -923,12 +923,17 @@ static inline void pipelined_send(struct mqueue_inode_info *info, struct msg_msg *message, struct ext_wait_queue *receiver) { + /* + * Keep them in one critical section for PREEMPT_RT: + */ + preempt_disable_rt(); receiver->msg = message; list_del(&receiver->list); receiver->state = STATE_PENDING; wake_up_process(receiver->task); smp_wmb(); receiver->state = STATE_READY; + preempt_enable_rt(); } /* pipelined_receive() - if there is task waiting in sys_mq_timedsend() |