Lines Matching refs:port
83 #include <mach/port.h>
95 * A receive right (port) can be in four states:
100 * to the destination port and holds a ref for it)
103 * If the port is active, and ip_receiver points to some space,
105 * If the port is not active, then ip_timestamp contains a timestamp
106 * taken when the port was destroyed.
175 #define IP_VALID(port) IPC_PORT_VALID(port)
177 #define ip_active(port) io_active(&(port)->ip_object)
178 #define ip_lock_init(port) io_lock_init(&(port)->ip_object)
179 #define ip_lock(port) io_lock(&(port)->ip_object)
180 #define ip_lock_try(port) io_lock_try(&(port)->ip_object)
181 #define ip_unlock(port) io_unlock(&(port)->ip_object)
182 #define ip_check_unlock(port) io_check_unlock(&(port)->ip_object)
184 #define ip_reference(port) io_reference(&(port)->ip_object)
185 #define ip_release(port) io_release(&(port)->ip_object)
187 #define ip_kotype(port) io_kotype(&(port)->ip_object)
192 * port and we should use that when sending (from the kernel) rather than
198 #define IP_PREALLOC(port) ((port)->ip_bits & IP_BIT_PREALLOC)
200 #define IP_SET_PREALLOC(port, kmsg) \
202 (port)->ip_bits |= IP_BIT_PREALLOC; \
203 (port)->ip_premsg = (kmsg); \
206 #define IP_CLEAR_PREALLOC(port, kmsg) \
208 assert((port)->ip_premsg == kmsg); \
209 (port)->ip_bits &= ~IP_BIT_PREALLOC; \
210 (port)->ip_premsg = IKM_NULL; \
216 struct ipc_port *port;
229 #define ipr_soright notify.port
250 * The port timestamp facility provides timestamps
251 * for port destruction. It is used to serialize
252 * mach_port_names with port death.
267 /* Retrieve a port timestamp value */
292 ipc_port_t port,
297 /* Grow a port's table of dead-name requests */
299 ipc_port_t port,
304 ipc_port_t port,
308 #define ipc_port_dnrename(port, index, oname, nname) \
312 assert(ip_active(port)); \
314 table = port->ip_dnrequests; \
323 /* Make a port-deleted request */
325 ipc_port_t port,
331 ipc_port_t port,
336 #define ipc_port_set_mscount(port, mscount) \
338 assert(ip_active(port)); \
340 (port)->ip_mscount = (mscount); \
345 ipc_port_t port);
347 /* Initialize a newly-allocated port */
349 ipc_port_t port,
353 /* Allocate a port */
359 /* Allocate a port, with a specific name */
367 ipc_port_t port,
370 /* Destroy a port */
372 ipc_port_t port);
374 /* Check if queueing "port" in a message for "dest" would create a circular
378 ipc_port_t port,
381 /* Make a send-once notify port from a receive right */
386 /* Make a naked send right from a receive right - port locked and active */
388 ipc_port_t port);
392 ipc_port_t port);
396 ipc_port_t port);
405 ipc_port_t port);
409 ipc_port_t port);
413 ipc_port_t port);
417 ipc_port_t port);
419 /* Allocate a port in a special space */
423 /* Deallocate a port in a special space */
425 ipc_port_t port,
429 /* Track low-level port deallocation */
431 ipc_port_t port);
433 /* Initialize general port debugging state */
439 #define ipc_port_dealloc_kernel(port) \
440 ipc_port_dealloc_special((port), ipc_space_kernel)
444 #define ipc_port_dealloc_reply(port) \
445 ipc_port_dealloc_special((port), ipc_space_reply)
447 #define ipc_port_reference(port) \
448 ipc_object_reference(&(port)->ip_object)
450 #define ipc_port_release(port) \
451 ipc_object_release(&(port)->ip_object)