-
- lck_grp_attr_setdefault(&ipc_lck_grp_attr);
- lck_grp_init(&ipc_lck_grp, "ipc", &ipc_lck_grp_attr);
- lck_attr_setdefault(&ipc_lck_attr);
-
- ipc_port_multiple_lock_init();
-
- ipc_port_timestamp_data = 0;
-
- /* all IPC zones should be exhaustible */
-
- ipc_space_zone = zinit(sizeof(struct ipc_space),
- ipc_space_max * sizeof(struct ipc_space),
- sizeof(struct ipc_space),
- "ipc spaces");
- zone_change(ipc_space_zone, Z_NOENCRYPT, TRUE);
-
- /*
- * populate all port(set) zones
- */
- ipc_object_zones[IOT_PORT] =
- zinit(sizeof(struct ipc_port),
- ipc_port_max * sizeof(struct ipc_port),
- sizeof(struct ipc_port),
- "ipc ports");
- /* cant charge callers for port allocations (references passed) */
- zone_change(ipc_object_zones[IOT_PORT], Z_CALLERACCT, FALSE);
- zone_change(ipc_object_zones[IOT_PORT], Z_NOENCRYPT, TRUE);
-
- ipc_object_zones[IOT_PORT_SET] =
- zinit(sizeof(struct ipc_pset),
- ipc_pset_max * sizeof(struct ipc_pset),
- sizeof(struct ipc_pset),
- "ipc port sets");
- zone_change(ipc_object_zones[IOT_PORT_SET], Z_NOENCRYPT, TRUE);
-
- /*
- * Create the basic ipc_kmsg_t zone (the one we also cache)
- * elements at the processor-level to avoid the locking.
- */
- ipc_kmsg_zone = zinit(IKM_SAVED_KMSG_SIZE,
- ipc_port_max * MACH_PORT_QLIMIT_DEFAULT *
- IKM_SAVED_KMSG_SIZE,
- IKM_SAVED_KMSG_SIZE,
- "ipc kmsgs");
- zone_change(ipc_kmsg_zone, Z_CALLERACCT, FALSE);