patch-2.3.30 linux/ipc/util.h

Next file: linux/kernel/ksyms.c
Previous file: linux/ipc/util.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.29/linux/ipc/util.h linux/ipc/util.h
@@ -45,6 +45,26 @@
 void* ipc_alloc(int size);
 void ipc_free(void* ptr, int size);
 
+extern inline void ipc_lockall(struct ipc_ids* ids)
+{
+	spin_lock(&ids->ary);
+}
+
+extern inline struct ipc_perm* ipc_get(struct ipc_ids* ids, int id)
+{
+	struct ipc_perm* out;
+	int lid = id % SEQ_MULTIPLIER;
+	if(lid > ids->size)
+		return NULL;
+
+	out = ids->entries[lid].p;
+	return out;
+}
+
+extern inline void ipc_unlockall(struct ipc_ids* ids)
+{
+	spin_unlock(&ids->ary);
+}
 extern inline struct ipc_perm* ipc_lock(struct ipc_ids* ids, int id)
 {
 	struct ipc_perm* out;

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