Contents

IOMasterPort(_:_:)

Returns the mach port used to initiate communication with IOKit.

Declaration

func IOMasterPort(_ bootstrapPort: mach_port_t, _ mainPort: UnsafeMutablePointer<mach_port_t>!) -> kern_return_t

Parameters

  • bootstrapPort:

    Pass MACH_PORT_NULL for the default.

  • masterPort:

    The primary port is returned.

Return Value

A kern_return_t error code.

Discussion

Functions that don't specify an existing object require the IOKit primary port to be passed. This function obtains that port.

See Also

Miscellaneous