Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1452176

[PATCH 3/5] ipc/msg: Make ss_wakeup() kill arg boolean

From Davidlohr Bueso <dave@stgolabs.net>
Newsgroups linux.kernel
Subject [PATCH 3/5] ipc/msg: Make ss_wakeup() kill arg boolean
Date 2016-07-29 01:40 +0200
Message-ID <s034d-4NM-11@gated-at.bofh.it> (permalink)
References <s034d-4NM-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


... 'tis annoying.

Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
---
 ipc/msg.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ipc/msg.c b/ipc/msg.c
index 395013d58fda..5181259e2ff0 100644
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -167,7 +167,7 @@ static inline void ss_del(struct msg_sender *mss)
 }
 
 static void ss_wakeup(struct list_head *h,
-		      struct wake_q_head *wake_q, int kill)
+		      struct wake_q_head *wake_q, bool kill)
 {
 	struct msg_sender *mss, *t;
 
@@ -204,7 +204,7 @@ static void freeque(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp)
 	WAKE_Q(wake_q);
 
 	expunge_all(msq, -EIDRM, &wake_q);
-	ss_wakeup(&msq->q_senders, &wake_q, 1);
+	ss_wakeup(&msq->q_senders, &wake_q, true);
 	msg_rmid(ns, msq);
 	ipc_unlock_object(&msq->q_perm);
 	wake_up_q(&wake_q);
@@ -388,7 +388,7 @@ static int msgctl_down(struct ipc_namespace *ns, int msqid, int cmd,
 		 * Sleeping senders might be able to send
 		 * due to a larger queue size.
 		 */
-		ss_wakeup(&msq->q_senders, &wake_q, 0);
+		ss_wakeup(&msq->q_senders, &wake_q, false);
 		ipc_unlock_object(&msq->q_perm);
 		wake_up_q(&wake_q);
 
@@ -882,7 +882,7 @@ long do_msgrcv(int msqid, void __user *buf, size_t bufsz, long msgtyp, int msgfl
 			msq->q_cbytes -= msg->m_ts;
 			atomic_sub(msg->m_ts, &ns->msg_bytes);
 			atomic_dec(&ns->msg_hdrs);
-			ss_wakeup(&msq->q_senders, &wake_q, 0);
+			ss_wakeup(&msq->q_senders, &wake_q, false);
 
 			goto out_unlock0;
 		}
-- 
2.6.6

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/5] ipc/msg: Sender/receiver optimizations Davidlohr Bueso <dave@stgolabs.net> - 2016-07-29 01:40 +0200
  [PATCH 3/5] ipc/msg: Make ss_wakeup() kill arg boolean Davidlohr Bueso <dave@stgolabs.net> - 2016-07-29 01:40 +0200
  [PATCH 2/5] ipc/msg: Batch queue sender wakeups Davidlohr Bueso <dave@stgolabs.net> - 2016-07-29 01:40 +0200
  Re: [PATCH 0/5] ipc/msg: Sender/receiver optimizations Peter Zijlstra <peterz@infradead.org> - 2016-08-04 18:50 +0200
    Re: [PATCH 0/5] ipc/msg: Sender/receiver optimizations Peter Zijlstra <peterz@infradead.org> - 2016-08-09 14:50 +0200
      Re: [PATCH 0/5] ipc/msg: Sender/receiver optimizations Andrew Morton <akpm@linux-foundation.org> - 2016-08-09 20:40 +0200

csiph-web