diff options
author | Nadia Derbey <Nadia.Derbey@bull.net> | 2007-10-19 02:40:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-19 14:53:44 -0400 |
commit | 7ca7e564e049d8b350ec9d958ff25eaa24226352 (patch) | |
tree | e3c1397dc898dbd7c685c6a052425e7346eb79d1 /include/linux | |
parent | d2b20b11547cefc89d6c81937e81afaf3c62808b (diff) |
ipc: store ipcs into IDRs
This patch introduces ipcs storage into IDRs. The main changes are:
. This ipc_ids structure is changed: the entries array is changed into a
root idr structure.
. The grow_ary() routine is removed: it is not needed anymore when adding
an ipc structure, since we are now using the IDR facility.
. The ipc_rmid() routine interface is changed:
. there is no need for this routine to return the pointer passed in as
argument: it is now declared as a void
. since the id is now part of the kern_ipc_perm structure, no need to
have it as an argument to the routine
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 'include/linux')
-rw-r--r-- | include/linux/ipc.h | 1 | ||||
-rw-r--r-- | include/linux/msg.h | 1 | ||||
-rw-r--r-- | include/linux/sem.h | 1 | ||||
-rw-r--r-- | include/linux/shm.h | 1 |
4 files changed, 1 insertions, 3 deletions
diff --git a/include/linux/ipc.h b/include/linux/ipc.h index ee111834091c..96988d1460da 100644 --- a/include/linux/ipc.h +++ b/include/linux/ipc.h | |||
@@ -89,6 +89,7 @@ struct kern_ipc_perm | |||
89 | { | 89 | { |
90 | spinlock_t lock; | 90 | spinlock_t lock; |
91 | int deleted; | 91 | int deleted; |
92 | int id; | ||
92 | key_t key; | 93 | key_t key; |
93 | uid_t uid; | 94 | uid_t uid; |
94 | gid_t gid; | 95 | gid_t gid; |
diff --git a/include/linux/msg.h b/include/linux/msg.h index f1b60740d641..10a3d5a1abff 100644 --- a/include/linux/msg.h +++ b/include/linux/msg.h | |||
@@ -77,7 +77,6 @@ struct msg_msg { | |||
77 | /* one msq_queue structure for each present queue on the system */ | 77 | /* one msq_queue structure for each present queue on the system */ |
78 | struct msg_queue { | 78 | struct msg_queue { |
79 | struct kern_ipc_perm q_perm; | 79 | struct kern_ipc_perm q_perm; |
80 | int q_id; | ||
81 | time_t q_stime; /* last msgsnd time */ | 80 | time_t q_stime; /* last msgsnd time */ |
82 | time_t q_rtime; /* last msgrcv time */ | 81 | time_t q_rtime; /* last msgrcv time */ |
83 | time_t q_ctime; /* last change time */ | 82 | time_t q_ctime; /* last change time */ |
diff --git a/include/linux/sem.h b/include/linux/sem.h index 9aaffb0b1d81..c8eaad9e4b72 100644 --- a/include/linux/sem.h +++ b/include/linux/sem.h | |||
@@ -90,7 +90,6 @@ struct sem { | |||
90 | /* One sem_array data structure for each set of semaphores in the system. */ | 90 | /* One sem_array data structure for each set of semaphores in the system. */ |
91 | struct sem_array { | 91 | struct sem_array { |
92 | struct kern_ipc_perm sem_perm; /* permissions .. see ipc.h */ | 92 | struct kern_ipc_perm sem_perm; /* permissions .. see ipc.h */ |
93 | int sem_id; | ||
94 | time_t sem_otime; /* last semop time */ | 93 | time_t sem_otime; /* last semop time */ |
95 | time_t sem_ctime; /* last change time */ | 94 | time_t sem_ctime; /* last change time */ |
96 | struct sem *sem_base; /* ptr to first semaphore in array */ | 95 | struct sem *sem_base; /* ptr to first semaphore in array */ |
diff --git a/include/linux/shm.h b/include/linux/shm.h index bea65d9c93ef..eeaed921a1dc 100644 --- a/include/linux/shm.h +++ b/include/linux/shm.h | |||
@@ -79,7 +79,6 @@ struct shmid_kernel /* private to the kernel */ | |||
79 | { | 79 | { |
80 | struct kern_ipc_perm shm_perm; | 80 | struct kern_ipc_perm shm_perm; |
81 | struct file * shm_file; | 81 | struct file * shm_file; |
82 | int id; | ||
83 | unsigned long shm_nattch; | 82 | unsigned long shm_nattch; |
84 | unsigned long shm_segsz; | 83 | unsigned long shm_segsz; |
85 | time_t shm_atim; | 84 | time_t shm_atim; |