Lines Matching refs:port
58 ipc_port_t port;
60 port = ipc_port_alloc_kernel();
61 if (port == IP_NULL)
63 clock->cl_service = port;
65 port = ipc_port_alloc_kernel();
66 if (port == IP_NULL)
68 clock->cl_control = port;
89 * Convert from a port to a clock.
90 * Doesn't consume the port ref; produces a clock ref,
97 ipc_port_t port)
101 if (IP_VALID(port)) {
102 ip_lock(port);
103 if (ip_active(port) &&
104 ((ip_kotype(port) == IKOT_CLOCK) ||
105 (ip_kotype(port) == IKOT_CLOCK_CTRL))) {
106 clock = (clock_t) port->ip_kobject;
108 ip_unlock(port);
116 * Convert from a port to a clock.
117 * Doesn't consume the port ref; produces a clock ref,
124 ipc_port_t port)
128 if (IP_VALID(port)) {
129 ip_lock(port);
130 if (ip_active(port) &&
131 (ip_kotype(port) == IKOT_CLOCK_CTRL)) {
132 clock = (clock_t) port->ip_kobject;
134 ip_unlock(port);
142 * Convert from a clock to a port.
151 ipc_port_t port;
153 port = ipc_port_make_send(clock->cl_service);
154 return (port);
160 * Convert from a clock to a port.
169 ipc_port_t port;
171 port = ipc_port_make_send(clock->cl_control);
172 return (port);
186 ipc_port_t port;
191 if (ipc_port_translate_send(space, clock_name, &port) != KERN_SUCCESS)
193 if (ip_active(port) && (ip_kotype(port) == IKOT_CLOCK))
194 clock = (clock_t) port->ip_kobject;
195 ip_unlock(port);