patch-2.3.1 linux/ipc/msg.c

Next file: linux/ipc/sem.c
Previous file: linux/init/main.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.0/linux/ipc/msg.c linux/ipc/msg.c
@@ -30,7 +30,7 @@
 static unsigned short msg_seq = 0;
 static int used_queues = 0;
 static int max_msqid = 0;
-static struct wait_queue *msg_lock = NULL;
+static DECLARE_WAIT_QUEUE_HEAD(msg_lock);
 
 void __init msg_init (void)
 {
@@ -39,7 +39,7 @@
 	for (id = 0; id < MSGMNI; id++) 
 		msgque[id] = (struct msqid_ds *) IPC_UNUSED;
 	msgbytes = msghdrs = msg_seq = max_msqid = used_queues = 0;
-	msg_lock = NULL;
+	init_waitqueue_head(&msg_lock);
 	return;
 }
 
@@ -284,7 +284,8 @@
 	ipcp->gid = ipcp->cgid = current->egid;
 	msq->msg_perm.seq = msg_seq;
 	msq->msg_first = msq->msg_last = NULL;
-	msq->rwait = msq->wwait = NULL;
+	init_waitqueue_head(&msq->wwait);
+	init_waitqueue_head(&msq->rwait);
 	msq->msg_cbytes = msq->msg_qnum = 0;
 	msq->msg_lspid = msq->msg_lrpid = 0;
 	msq->msg_stime = msq->msg_rtime = 0;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)