summaryrefslogtreecommitdiff
path: root/ipc/util.h
diff options
context:
space:
mode:
authorNadia Derbey <Nadia.Derbey@bull.net>2007-10-18 23:40:52 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-19 11:53:47 -0700
commit28028313134e9f11e49f74a4beaa47c91e5ebf06 (patch)
treeadf36a3b40c5cb48ff5bd8803fc10530bac65450 /ipc/util.h
parentce621f5ba52f30dd59aef4fb50276faee04ef9cf (diff)
downloadlwn-28028313134e9f11e49f74a4beaa47c91e5ebf06.tar.gz
lwn-28028313134e9f11e49f74a4beaa47c91e5ebf06.zip
ipc: inline ipc_buildid()
This is a trivial patch that changes the ipc_buildid() routine into a static inline. Signed-off-by: Nadia Derbey <Nadia.Derbey@bull.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'ipc/util.h')
-rw-r--r--ipc/util.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/ipc/util.h b/ipc/util.h
index fa7e7a07486e..76f8a79902de 100644
--- a/ipc/util.h
+++ b/ipc/util.h
@@ -107,7 +107,6 @@ void ipc_rcu_getref(void *ptr);
void ipc_rcu_putref(void *ptr);
struct kern_ipc_perm *ipc_lock(struct ipc_ids *, int);
-int ipc_buildid(struct ipc_ids* ids, int id, int seq);
void kernel_to_ipc64_perm(struct kern_ipc_perm *in, struct ipc64_perm *out);
void ipc64_perm_to_ipc_perm(struct ipc64_perm *in, struct ipc_perm *out);
@@ -127,6 +126,11 @@ extern int ipcget_new(struct ipc_namespace *, struct ipc_ids *,
extern int ipcget_public(struct ipc_namespace *, struct ipc_ids *,
struct ipc_ops *, struct ipc_params *);
+static inline int ipc_buildid(struct ipc_ids *ids, int id, int seq)
+{
+ return SEQ_MULTIPLIER * seq + id;
+}
+
static inline int ipc_checkid(struct ipc_ids *ids, struct kern_ipc_perm *ipcp,
int uid)
{