289 static void msg_wakeup_senders(kmsqid_t *);
290 static void msg_wakeup_rdr(kmsqid_t *, msg_select_t **, long);
291 static msgq_wakeup_t *msg_fnd_any_snd(kmsqid_t *, int, long);
292 static msgq_wakeup_t *msg_fnd_any_rdr(kmsqid_t *, int, long);
293 static msgq_wakeup_t *msg_fnd_neg_snd(kmsqid_t *, int, long);
294 static msgq_wakeup_t *msg_fnd_spc_snd(kmsqid_t *, int, long);
295 static struct msg *msgrcv_lookup(kmsqid_t *, long);
296
297 msg_select_t msg_fnd_sndr[] = {
298 { msg_fnd_any_snd, &msg_fnd_sndr[1] },
299 { msg_fnd_spc_snd, &msg_fnd_sndr[2] },
300 { msg_fnd_neg_snd, &msg_fnd_sndr[0] }
301 };
302
303 msg_select_t msg_fnd_rdr[1] = {
304 { msg_fnd_any_rdr, &msg_fnd_rdr[0] },
305 };
306
307 static struct modlinkage modlinkage = {
308 MODREV_1,
309 &modlsys,
310 #ifdef _SYSCALL32_IMPL
311 &modlsys32,
312 #endif
313 NULL
314 };
315
316 #define MSG_SMALL_INIT (size_t)-1
317 int
318 _init(void)
319 {
320 int result;
321
322 msq_svc = ipcs_create("msqids", rc_project_msgmni, rc_zone_msgmni,
323 sizeof (kmsqid_t), msg_dtor, msg_rmid, AT_IPC_MSG,
324 offsetof(ipc_rqty_t, ipcq_msgmni));
325 zone_key_create(&msg_zone_key, NULL, msg_remove_zone, NULL);
326
327 if ((result = mod_install(&modlinkage)) == 0)
328 return (0);
329
330 (void) zone_key_delete(msg_zone_key);
331 ipcs_destroy(msq_svc);
332
333 return (result);
|
289 static void msg_wakeup_senders(kmsqid_t *);
290 static void msg_wakeup_rdr(kmsqid_t *, msg_select_t **, long);
291 static msgq_wakeup_t *msg_fnd_any_snd(kmsqid_t *, int, long);
292 static msgq_wakeup_t *msg_fnd_any_rdr(kmsqid_t *, int, long);
293 static msgq_wakeup_t *msg_fnd_neg_snd(kmsqid_t *, int, long);
294 static msgq_wakeup_t *msg_fnd_spc_snd(kmsqid_t *, int, long);
295 static struct msg *msgrcv_lookup(kmsqid_t *, long);
296
297 msg_select_t msg_fnd_sndr[] = {
298 { msg_fnd_any_snd, &msg_fnd_sndr[1] },
299 { msg_fnd_spc_snd, &msg_fnd_sndr[2] },
300 { msg_fnd_neg_snd, &msg_fnd_sndr[0] }
301 };
302
303 msg_select_t msg_fnd_rdr[1] = {
304 { msg_fnd_any_rdr, &msg_fnd_rdr[0] },
305 };
306
307 static struct modlinkage modlinkage = {
308 MODREV_1,
309 { &modlsys,
310 #ifdef _SYSCALL32_IMPL
311 &modlsys32,
312 #endif
313 NULL
314 }
315 };
316
317 #define MSG_SMALL_INIT (size_t)-1
318 int
319 _init(void)
320 {
321 int result;
322
323 msq_svc = ipcs_create("msqids", rc_project_msgmni, rc_zone_msgmni,
324 sizeof (kmsqid_t), msg_dtor, msg_rmid, AT_IPC_MSG,
325 offsetof(ipc_rqty_t, ipcq_msgmni));
326 zone_key_create(&msg_zone_key, NULL, msg_remove_zone, NULL);
327
328 if ((result = mod_install(&modlinkage)) == 0)
329 return (0);
330
331 (void) zone_key_delete(msg_zone_key);
332 ipcs_destroy(msq_svc);
333
334 return (result);
|