mach_port_get_set_status


Function - Return the port right names contained in the target port set.

SYNOPSIS

kern_return_t   mach_port_get_set_status
                (ipc_space_t                               task,
                 mach_port_name_t                          name,
                 mach_port_name_array_t                *members,
                 task                                     count);

PARAMETERS

task
[in task send right] The task holding the port set.

name
[in scalar] The task's name for the port set.

members
[out pointer to dynamic array of mach_port_name_t] The task's names for the port set's members.

count
[out scalar] The number of member names returned.

DESCRIPTION

The mach_port_get_set_status function returns the individual port right names for all port rights contained in the specified port set. The members parameter is an array that is automatically allocated when the reply message is received. Note that vm_deallocate should be used to free the array.

Note that this interface, unlike others such as task_threads, returns a collection of port right names, NOT a collection of port rights themselves. In other words, this function does not insert port rights into the caller's port right name space; consequently, a call to mach_port_get_set_status does not affect the reference count of each port right within the target port set.

NOTES

This interface is machine word length specific because of the port name parameter and the returned port names.

RETURN VALUES

KERN_INVALID_NAME
name did not denote a right.

KERN_INVALID_RIGHT
name denoted a right, but not a port set.

RELATED INFORMATION

Functions: mach_port_insert_member, mach_port_extract_member, mach_port_move_member, vm_deallocate.