diff options
author | Nadia Derbey <Nadia.Derbey@bull.net> | 2007-10-18 23:40:52 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-19 11:53:46 -0700 |
commit | ce621f5ba52f30dd59aef4fb50276faee04ef9cf (patch) | |
tree | e0260364cf8748849d37165760db6d4e4e51ed9c /ipc/util.h | |
parent | 03f02c7657f7948ab980280c54c9366f962b1474 (diff) | |
download | kernel_goldelico_gta04-ce621f5ba52f30dd59aef4fb50276faee04ef9cf.zip kernel_goldelico_gta04-ce621f5ba52f30dd59aef4fb50276faee04ef9cf.tar.gz kernel_goldelico_gta04-ce621f5ba52f30dd59aef4fb50276faee04ef9cf.tar.bz2 |
ipc: introduce the ipcid_to_idx macro
This is a trivial patch that changes all the (id % SEQ_MULTIPLIER) into a call
to the ipcid_to_idx(id) macro.
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.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -79,6 +79,8 @@ void __init ipc_init_proc_interface(const char *path, const char *header, #define IPC_MSG_IDS 1 #define IPC_SHM_IDS 2 +#define ipcid_to_idx(id) ((id) % SEQ_MULTIPLIER) + /* must be called with ids->mutex acquired.*/ int ipc_addid(struct ipc_ids *, struct kern_ipc_perm *, int); int ipc_get_maxid(struct ipc_ids *); |