Next: Request Notifications, Previous: Receive Rights, Up: Port Manipulation Interface
The function
mach_port_get_set_statusreturns the members of a port set. members is an array that is automatically allocated when the reply message is received. The user shouldvm_deallocateit when the data is no longer needed.The function returns
KERN_SUCCESSif the call succeeded,KERN_INVALID_TASKif task was invalid,KERN_INVALID_NAMEif name did not denote a right,KERN_INVALID_RIGHTif name denoted a right, but not a receive right andKERN_RESOURCE_SHORTAGEif the kernel ran out of memory.The
mach_port_get_set_statuscall 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_msgreturn 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_SUCCESSif the call succeeded,KERN_INVALID_TASKif task was invalid,KERN_INVALID_NAMEif member or after did not denote a right,KERN_INVALID_RIGHTif member denoted a right, but not a receive right or after denoted a right, but not a port set, andKERN_NOT_IN_SETif after wasMACH_PORT_NULL, butmemberwasn't currently in a port set.The
mach_port_move_membercall 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_msgreturn codes.