patch-2.3.1 linux/ipc/sem.c

Next file: linux/ipc/shm.c
Previous file: linux/ipc/msg.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.0/linux/ipc/sem.c linux/ipc/sem.c
@@ -63,7 +63,7 @@
 
 static struct semid_ds *semary[SEMMNI];
 static int used_sems = 0, used_semids = 0;
-static struct wait_queue *sem_lock = NULL;
+static DECLARE_WAIT_QUEUE_HEAD(sem_lock);
 static int max_semid = 0;
 
 static unsigned short sem_seq = 0;
@@ -72,7 +72,7 @@
 {
 	int i;
 
-	sem_lock = NULL;
+	init_waitqueue_head(&sem_lock);
 	used_sems = used_semids = max_semid = sem_seq = 0;
 	for (i = 0; i < SEMMNI; i++)
 		semary[i] = (struct semid_ds *) IPC_UNUSED;
@@ -690,7 +690,7 @@
 
         for (;;) {
                 queue.status = -EINTR;
-                queue.sleeper = NULL;
+                init_waitqueue_head(&queue.sleeper);
                 interruptible_sleep_on(&queue.sleeper);
 
                 /*

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