191 #ifdef _SYSCALL32_IMPL
192 static struct sysent ipcshm_sysent32 = {
193 4,
194 SE_ARGC | SE_NOUNLOAD | SE_32RVAL1,
195 (int (*)())shmsys
196 };
197 #endif /* _SYSCALL32_IMPL */
198
199 static struct modlsys modlsys = {
200 &mod_syscallops, "System V shared memory", &ipcshm_sysent
201 };
202
203 #ifdef _SYSCALL32_IMPL
204 static struct modlsys modlsys32 = {
205 &mod_syscallops32, "32-bit System V shared memory", &ipcshm_sysent32
206 };
207 #endif /* _SYSCALL32_IMPL */
208
209 static struct modlinkage modlinkage = {
210 MODREV_1,
211 &modlsys,
212 #ifdef _SYSCALL32_IMPL
213 &modlsys32,
214 #endif
215 NULL
216 };
217
218
219 int
220 _init(void)
221 {
222 int result;
223
224 shm_svc = ipcs_create("shmids", rc_project_shmmni, rc_zone_shmmni,
225 sizeof (kshmid_t), shm_dtor, shm_rmid, AT_IPC_SHM,
226 offsetof(ipc_rqty_t, ipcq_shmmni));
227 zone_key_create(&shm_zone_key, NULL, shm_remove_zone, NULL);
228
229 if ((result = mod_install(&modlinkage)) == 0)
230 return (0);
231
232 (void) zone_key_delete(shm_zone_key);
233 ipcs_destroy(shm_svc);
234
235 return (result);
|
191 #ifdef _SYSCALL32_IMPL
192 static struct sysent ipcshm_sysent32 = {
193 4,
194 SE_ARGC | SE_NOUNLOAD | SE_32RVAL1,
195 (int (*)())shmsys
196 };
197 #endif /* _SYSCALL32_IMPL */
198
199 static struct modlsys modlsys = {
200 &mod_syscallops, "System V shared memory", &ipcshm_sysent
201 };
202
203 #ifdef _SYSCALL32_IMPL
204 static struct modlsys modlsys32 = {
205 &mod_syscallops32, "32-bit System V shared memory", &ipcshm_sysent32
206 };
207 #endif /* _SYSCALL32_IMPL */
208
209 static struct modlinkage modlinkage = {
210 MODREV_1,
211 { &modlsys,
212 #ifdef _SYSCALL32_IMPL
213 &modlsys32,
214 #endif
215 NULL
216 }
217 };
218
219
220 int
221 _init(void)
222 {
223 int result;
224
225 shm_svc = ipcs_create("shmids", rc_project_shmmni, rc_zone_shmmni,
226 sizeof (kshmid_t), shm_dtor, shm_rmid, AT_IPC_SHM,
227 offsetof(ipc_rqty_t, ipcq_shmmni));
228 zone_key_create(&shm_zone_key, NULL, shm_remove_zone, NULL);
229
230 if ((result = mod_install(&modlinkage)) == 0)
231 return (0);
232
233 (void) zone_key_delete(shm_zone_key);
234 ipcs_destroy(shm_svc);
235
236 return (result);
|