Lines Matching defs:lh
73 ipc_labelh_t lh;
107 lh = (ipc_labelh_t)zalloc(ipc_labelh_zone);
108 lh_lock_init(lh);
109 lh->lh_port = port;
110 lh->lh_label = *inl;
111 lh->lh_type = LABELH_TYPE_USER;
112 lh->lh_references = 1; /* unused for LABELH_TYPE_USER */
115 ip_unlock(lh->lh_port);
116 ipc_kobject_set(lh->lh_port, (ipc_kobject_t)lh, IKOT_LABELH);
150 ipc_labelh_t lh;
152 lh = (ipc_labelh_t)zalloc_canblock(ipc_labelh_zone, canblock);
153 lh_lock_init(lh);
154 lh->lh_port = ipc_port_alloc_kernel();
155 lh->lh_type = LABELH_TYPE_KERN;
156 lh->lh_references = 1;
157 ipc_kobject_set(lh->lh_port, (ipc_kobject_t)lh, IKOT_LABELH);
159 return (lh);
169 ipc_labelh_t lh;
171 lh = labelh_new(0);
172 ip_lock(lh->lh_port);
173 mac_task_label_init(&lh->lh_label);
174 mac_task_label_copy(&old->lh_label, &lh->lh_label);
175 ip_unlock(lh->lh_port);
176 return (lh);
186 ipc_labelh_t lh;
195 lh = labelh_duplicate(old);
198 lh_lock(lh);
199 return (lh);
206 labelh_reference(ipc_labelh_t lh)
208 lh_lock(lh);
209 lh_reference(lh);
210 lh_unlock(lh);
211 return (lh);
218 labelh_release(ipc_labelh_t lh)
220 lh_lock(lh);
221 lh_release(lh);
222 lh_check_unlock(lh);
234 ipc_labelh_t lh = (ipc_labelh_t) port->ip_kobject;
236 mac_task_label_destroy(&lh->lh_label);
237 lh_lock_destroy(lh);
238 zfree(ipc_labelh_zone, (vm_offset_t)lh);