pub unsafe extern "C-unwind" fn IOCreateReceivePort(
msg_type: u32,
recv_port: *mut mach_port_t,
) -> kern_return_tAvailable on crate feature
libc only.Expand description
Creates and returns a mach port suitable for receiving IOKit messages of the specified type.
In the future IOKit may use specialized messages and ports instead of the standard ports created by mach_port_allocate(). Use this function instead of mach_port_allocate() to ensure compatibility with future revisions of IOKit.
Parameter msgType: Type of message to be sent to this port
(kOSNotificationMessageID or kOSAsyncCompleteMessageID)
Parameter recvPort: The created port is returned.
Returns: A kern_return_t error code.
ยงSafety
recv_port must be a valid pointer.