Lines Matching refs:port
94 ipc_port_t port, boolean_t matchn, processor_set_t *ppset);
102 ipc_port_t port;
110 port = ipc_port_alloc_kernel();
111 if (port == IP_NULL)
114 ipc_kobject_set(port, (ipc_kobject_t) &realhost, IKOT_HOST_SECURITY);
116 ipc_port_make_send(port));
118 port = ipc_port_alloc_kernel();
119 if (port == IP_NULL)
122 ipc_kobject_set(port, (ipc_kobject_t) &realhost, IKOT_HOST);
124 ipc_port_make_send(port));
126 port = ipc_port_alloc_kernel();
127 if (port == IP_NULL)
130 ipc_kobject_set(port, (ipc_kobject_t) &realhost, IKOT_HOST_PRIV);
132 ipc_port_make_send(port));
137 realhost.exc_actions[i].port = IP_NULL;
156 * Give the caller send rights for his own host port.
179 * Initialize ipc access to processor by allocating port.
186 ipc_port_t port;
188 port = ipc_port_alloc_kernel();
189 if (port == IP_NULL)
191 processor->processor_self = port;
197 * Enable ipc control of processor by setting port object.
212 * Disable ipc control of processor by clearing port object.
229 * Processor is off-line. Destroy ipc control port.
264 ipc_port_t port;
266 port = ipc_port_alloc_kernel();
267 if (port == IP_NULL)
269 pset->pset_self = port;
271 port = ipc_port_alloc_kernel();
272 if (port == IP_NULL)
274 pset->pset_name_self = port;
311 * Convert from a port to a host.
312 * Doesn't consume the port ref; the host produced may be null.
319 ipc_port_t port)
323 if (IP_VALID(port)) {
324 ip_lock(port);
325 if (ip_active(port) &&
326 ((ip_kotype(port) == IKOT_HOST) ||
327 (ip_kotype(port) == IKOT_HOST_PRIV)
329 host = (host_t) port->ip_kobject;
330 ip_unlock(port);
339 * Convert from a port to a host.
340 * Doesn't consume the port ref; the host produced may be null.
347 ipc_port_t port)
351 if (IP_VALID(port)) {
352 ip_lock(port);
353 if (ip_active(port) &&
354 (ip_kotype(port) == IKOT_HOST_PRIV))
355 host = (host_t) port->ip_kobject;
356 ip_unlock(port);
365 * Convert from a port to a processor.
366 * Doesn't consume the port ref;
374 ipc_port_t port)
378 if (IP_VALID(port)) {
379 ip_lock(port);
380 if (ip_active(port) &&
381 (ip_kotype(port) == IKOT_PROCESSOR))
382 processor = (processor_t) port->ip_kobject;
383 ip_unlock(port);
392 * Convert from a port to a pset.
393 * Doesn't consume the port ref; produces a pset ref,
401 ipc_port_t port)
407 while (!r && IP_VALID(port)) {
408 ip_lock(port);
409 r = ref_pset_port_locked(port, FALSE, &pset);
410 /* port unlocked */
418 * Convert from a port to a pset.
419 * Doesn't consume the port ref; produces a pset ref,
427 ipc_port_t port)
433 while (!r && IP_VALID(port)) {
434 ip_lock(port);
435 r = ref_pset_port_locked(port, TRUE, &pset);
436 /* port unlocked */
442 ref_pset_port_locked(ipc_port_t port, boolean_t matchn, processor_set_t *ppset)
447 if (ip_active(port) &&
448 ((ip_kotype(port) == IKOT_PSET) ||
449 (matchn && (ip_kotype(port) == IKOT_PSET_NAME)))) {
450 pset = (processor_set_t) port->ip_kobject;
454 ip_unlock(port);
462 * Convert from a host to a port.
472 ipc_port_t port;
474 host_get_host_port(host, &port);
475 return port;
481 * Convert from a processor to a port.
491 ipc_port_t port;
498 port = ipc_port_make_send(processor->processor_self);
500 port = IP_NULL;
505 return port;
511 * Convert from a pset to a port.
522 ipc_port_t port = pset->pset_self;
524 if (port != IP_NULL)
525 port = ipc_port_make_send(port);
527 return port;
533 * Convert from a pset to a port.
544 ipc_port_t port = pset->pset_name_self;
546 if (port != IP_NULL)
547 port = ipc_port_make_send(port);
549 return port;
555 * Convert from a port to a host security.
556 * Doesn't consume the port ref; the port produced may be null.
563 ipc_port_t port)
567 if (IP_VALID(port)) {
568 ip_lock(port);
569 if (ip_active(port) &&
570 (ip_kotype(port) == IKOT_HOST_SECURITY))
571 host = (host_t) port->ip_kobject;
572 ip_unlock(port);
581 * Sets the host exception port, flavor and
584 * port.
589 * KERN_SUCCESS Changed the special port.
633 old_port[i] = host_priv->exc_actions[i].port;
634 host_priv->exc_actions[i].port =
660 * and flavor of said port.
669 * Invalid special port,
705 if (host_priv->exc_actions[i].port == ports[j] &&
716 ipc_port_copy_send(host_priv->exc_actions[i].port);
782 if (host_priv->exc_actions[i].port == ports[j] &&
793 ipc_port_copy_send(host_priv->exc_actions[i].port);
798 old_port[i] = host_priv->exc_actions[i].port;
799 host_priv->exc_actions[i].port =