os_workgroup_copy_port
Returns the Mach port associated with the workgroup.
Declaration
extern int os_workgroup_copy_port(os_workgroup_t wg, mach_port_t *mach_port_out);Parameters
- wg:
The workgroup whose Mach port you want.
- mach_port_out:
A pointer to a Mach port variable. When the function returns, this parameter contains the specified workgroup’s Mach port reference.
Return Value
A value of 0 on success, or a nonzero error code if an error occurred.
Discussion
This function returns the send right for the workgroup’s Mach port in the kernel. Pass this port to other processes and use it to construct a reference to the same workgroup in those processes, which lets those processes coordinate their threads with the threads of the workgroup in the wg parameter.