Next: Request Notifications, Previous: Receive Rights, Up: Port Manipulation Interface
The function
mach_port_get_set_status
returns the members of a port set. members is an array that is automatically allocated when the reply message is received. The user shouldvm_deallocate
it when the data is no longer needed.The function returns
KERN_SUCCESS
if the call succeeded,KERN_INVALID_TASK
if task was invalid,KERN_INVALID_NAME
if name did not denote a right,KERN_INVALID_RIGHT
if name denoted a right, but not a receive right andKERN_RESOURCE_SHORTAGE
if the kernel ran out of memory.The
mach_port_get_set_status
call is actually an RPC to task, normally a send right for a task port, but potentially any send right. In addition to the normal diagnostic return codes from the call's server (normally the kernel), the call may returnmach_msg
return codes.
The function mach_port_move_member moves the receive right member into the port set after. If the receive right is already a member of another port set, it is removed from that set first (the whole operation is atomic). If the port set is
MACH_PORT_NULL
, then the receive right is not put into a port set, but removed from its current port set.The function returns
KERN_SUCCESS
if the call succeeded,KERN_INVALID_TASK
if task was invalid,KERN_INVALID_NAME
if member or after did not denote a right,KERN_INVALID_RIGHT
if member denoted a right, but not a receive right or after denoted a right, but not a port set, andKERN_NOT_IN_SET
if after wasMACH_PORT_NULL
, butmember
wasn't currently in a port set.The
mach_port_move_member
call is actually an RPC to task, normally a send right for a task port, but potentially any send right. In addition to the normal diagnostic return codes from the call's server (normally the kernel), the call may returnmach_msg
return codes.