lkml.org 
[lkml]   [2005]   [Dec]   [12]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateMon, 12 Dec 2005 23:45:49 GMT
FromDavid Howells <>
Subject[PATCH 16/19] MUTEX: IPC changes
The attached patch modifies the IPC files to use the new mutex functions.

Signed-Off-By: David Howells <dhowells@redhat.com>
---
warthog>diffstat -p1 mutex-ipc-2615rc5.diff
 ipc/compat.c |    2 +-
 ipc/util.c   |    2 +-
 ipc/util.h   |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
diff -uNrp /warthog/kernels/linux-2.6.15-rc5/ipc/compat.c linux-2.6.15-rc5-mutex/ipc/compat.c
--- /warthog/kernels/linux-2.6.15-rc5/ipc/compat.c	2005-11-01 13:19:22.000000000 +0000
+++ linux-2.6.15-rc5-mutex/ipc/compat.c	2005-12-12 22:12:50.000000000 +0000
@@ -29,8 +29,8 @@
 #include <linux/shm.h>
 #include <linux/slab.h>
 #include <linux/syscalls.h>
+#include <linux/semaphore.h>
 
-#include <asm/semaphore.h>
 #include <asm/uaccess.h>
 
 #include "util.h"
diff -uNrp /warthog/kernels/linux-2.6.15-rc5/ipc/util.c linux-2.6.15-rc5-mutex/ipc/util.c
--- /warthog/kernels/linux-2.6.15-rc5/ipc/util.c	2005-12-08 16:23:55.000000000 +0000
+++ linux-2.6.15-rc5-mutex/ipc/util.c	2005-12-12 17:40:08.000000000 +0000
@@ -67,7 +67,7 @@ __initcall(ipc_init);
 void __init ipc_init_ids(struct ipc_ids* ids, int size)
 {
 	int i;
-	sema_init(&ids->sem,1);
+	init_MUTEX(&ids->sem);
 
 	if(size > IPCMNI)
 		size = IPCMNI;
diff -uNrp /warthog/kernels/linux-2.6.15-rc5/ipc/util.h linux-2.6.15-rc5-mutex/ipc/util.h
--- /warthog/kernels/linux-2.6.15-rc5/ipc/util.h	2005-11-01 13:19:22.000000000 +0000
+++ linux-2.6.15-rc5-mutex/ipc/util.h	2005-12-12 17:39:49.000000000 +0000
@@ -25,7 +25,7 @@ struct ipc_ids {
 	int max_id;
 	unsigned short seq;
 	unsigned short seq_max;
-	struct semaphore sem;	
+	struct mutex sem;	
 	struct ipc_id_ary nullentry;
 	struct ipc_id_ary* entries;
 };
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-12-13 00:48    [from the cache]
©2003-2008