1 <h2>mach_port_get_refs
</h2>
4 <strong>Function
</strong> - Return the current count of user references on the target port right.
7 <strong>kern_return_t mach_port_get_refs
</strong>
8 <strong>(ipc_space_t
</strong> <var>task
</var>,
9 <strong>mach_port_name_t
</strong> <var>name
</var>,
10 <strong>mach_port_right_t
</strong> <var>right
</var>,
11 <strong>mach_port_urefs_t
</strong> <var>*refs
</var><strong>);
</strong>
19 The task holding the right.
24 The task's name for the right.
29 The type of right/entity being examined:
33 <strong>MACH_PORT_RIGHT_SEND
</strong>
36 <strong>MACH_PORT_RIGHT_RECEIVE
</strong>
39 <strong>MACH_PORT_RIGHT_SEND_ONCE
</strong>
42 <strong>MACH_PORT_RIGHT_PORT_SET
</strong>
45 <strong>MACH_PORT_RIGHT_DEAD_NAME
</strong>
51 Number of user references.
55 The
<strong>mach_port_get_refs
</strong> function returns the number
56 of user references a task
59 If
<var>name
</var> denotes a right, but not the type of right specified,
60 then zero is returned.
61 Otherwise a positive number of user references is returned. Note a name may
62 simultaneously denote send and receive rights. The number of references for
63 send-once rights is always one.
66 This interface is machine word length specific because of the port name
68 <h3>RETURN VALUES
</h3>
71 <dt> <strong>KERN_INVALID_NAME
</strong>
73 <var>name
</var> did not denote a right.
75 <h3>RELATED INFORMATION
</h3>
78 <a href=
"mach_port_mod_refs.html"><strong>mach_port_mod_refs
</strong></a>.