osfmk/man/mach_port_set_mscount.html
Function - Change the target port's make-send count.
**kern\_return\_t mach\_port\_set\_mscount**** (ipc\_space\_t **task,** mach\_port\_name\_t **name,** mach\_port\_mscount\_t **mscount** );**
task[in task send right] The task owning the receive right.
name[in scalar] task's name for the receive right.
mscount[in scalar] New value for the make-send count for the receive right.
The mach_port_set_mscount function changes the make-send count of task's receive right named name. A port's make-send count specifies the number of send rights that have been generated via the port's receive right. A port's make-send count is set to zero when the port is first allocated; the count is reset to zero each time the port's receive right is transferred via a Mach message.
This interface is machine word length specific because of the port name parameter.
KERN_INVALID_NAME name did not denote a right.
KERN_INVALID_RIGHT name denoted a right, but not a receive right.
Functions: mach_port_get_attributes.