Contents

unguardAndRelinquish()

Remove guard and transfer ownership of the underlying port right to the caller.

Declaration

consuming func unguardAndRelinquish() -> mach_port_name_t

Discussion

Returns the Mach port name representing the right.

This operation liberates the right from management by the Mach.Port, and the underlying right will no longer be automatically deallocated.

After this function completes, the Mach.Port is destroyed and no longer usable.

This function makes a syscall to remove the guard from Mach.ReceiveRights. Use relinquish() to avoid the syscall and extract the context value along with the port name.