• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/xnu-2422.115.4/osfmk/kern/

Lines Matching refs:port

86 	ipc_port_t port, boolean_t matchn, processor_set_t *ppset);
97 ipc_port_t port;
105 port = ipc_port_alloc_kernel();
106 if (port == IP_NULL)
109 ipc_kobject_set(port, (ipc_kobject_t) &realhost, IKOT_HOST_SECURITY);
111 ipc_port_make_send(port));
113 port = ipc_port_alloc_kernel();
114 if (port == IP_NULL)
117 ipc_kobject_set(port, (ipc_kobject_t) &realhost, IKOT_HOST);
119 ipc_port_make_send(port));
121 port = ipc_port_alloc_kernel();
122 if (port == IP_NULL)
125 ipc_kobject_set(port, (ipc_kobject_t) &realhost, IKOT_HOST_PRIV);
127 ipc_port_make_send(port));
132 realhost.exc_actions[i].port = IP_NULL;
151 * Give the caller send rights for his own host port.
174 * Initialize ipc access to processor by allocating port.
181 ipc_port_t port;
183 port = ipc_port_alloc_kernel();
184 if (port == IP_NULL)
186 processor->processor_self = port;
192 * Enable ipc control of processor by setting port object.
214 ipc_port_t port;
216 port = ipc_port_alloc_kernel();
217 if (port == IP_NULL)
219 pset->pset_self = port;
221 port = ipc_port_alloc_kernel();
222 if (port == IP_NULL)
224 pset->pset_name_self = port;
261 * Convert from a port to a host.
262 * Doesn't consume the port ref; the host produced may be null.
269 ipc_port_t port)
273 if (IP_VALID(port)) {
274 ip_lock(port);
275 if (ip_active(port) &&
276 ((ip_kotype(port) == IKOT_HOST) ||
277 (ip_kotype(port) == IKOT_HOST_PRIV)
279 host = (host_t) port->ip_kobject;
280 ip_unlock(port);
289 * Convert from a port to a host.
290 * Doesn't consume the port ref; the host produced may be null.
297 ipc_port_t port)
301 if (IP_VALID(port)) {
302 ip_lock(port);
303 if (ip_active(port) &&
304 (ip_kotype(port) == IKOT_HOST_PRIV))
305 host = (host_t) port->ip_kobject;
306 ip_unlock(port);
315 * Convert from a port to a processor.
316 * Doesn't consume the port ref;
324 ipc_port_t port)
328 if (IP_VALID(port)) {
329 ip_lock(port);
330 if (ip_active(port) &&
331 (ip_kotype(port) == IKOT_PROCESSOR))
332 processor = (processor_t) port->ip_kobject;
333 ip_unlock(port);
342 * Convert from a port to a pset.
343 * Doesn't consume the port ref; produces a pset ref,
351 ipc_port_t port)
357 while (!r && IP_VALID(port)) {
358 ip_lock(port);
359 r = ref_pset_port_locked(port, FALSE, &pset);
360 /* port unlocked */
368 * Convert from a port to a pset.
369 * Doesn't consume the port ref; produces a pset ref,
377 ipc_port_t port)
383 while (!r && IP_VALID(port)) {
384 ip_lock(port);
385 r = ref_pset_port_locked(port, TRUE, &pset);
386 /* port unlocked */
392 ref_pset_port_locked(ipc_port_t port, boolean_t matchn, processor_set_t *ppset)
397 if (ip_active(port) &&
398 ((ip_kotype(port) == IKOT_PSET) ||
399 (matchn && (ip_kotype(port) == IKOT_PSET_NAME)))) {
400 pset = (processor_set_t) port->ip_kobject;
404 ip_unlock(port);
412 * Convert from a host to a port.
422 ipc_port_t port;
424 host_get_host_port(host, &port);
425 return port;
431 * Convert from a processor to a port.
442 ipc_port_t port = processor->processor_self;
444 if (port != IP_NULL)
445 port = ipc_port_make_send(port);
446 return port;
452 * Convert from a pset to a port.
463 ipc_port_t port = pset->pset_self;
465 if (port != IP_NULL)
466 port = ipc_port_make_send(port);
468 return port;
474 * Convert from a pset to a port.
485 ipc_port_t port = pset->pset_name_self;
487 if (port != IP_NULL)
488 port = ipc_port_make_send(port);
490 return port;
496 * Convert from a port to a host security.
497 * Doesn't consume the port ref; the port produced may be null.
504 ipc_port_t port)
508 if (IP_VALID(port)) {
509 ip_lock(port);
510 if (ip_active(port) &&
511 (ip_kotype(port) == IKOT_HOST_SECURITY))
512 host = (host_t) port->ip_kobject;
513 ip_unlock(port);
522 * Sets the host exception port, flavor and
525 * port.
530 * KERN_SUCCESS Changed the special port.
574 old_port[i] = host_priv->exc_actions[i].port;
575 host_priv->exc_actions[i].port =
601 * and flavor of said port.
610 * Invalid special port,
646 if (host_priv->exc_actions[i].port == ports[j] &&
657 ipc_port_copy_send(host_priv->exc_actions[i].port);
723 if (host_priv->exc_actions[i].port == ports[j] &&
734 ipc_port_copy_send(host_priv->exc_actions[i].port);
739 old_port[i] = host_priv->exc_actions[i].port;
740 host_priv->exc_actions[i].port =