IODataQueueSetNotificationPort

Function IODataQueueSetNotificationPort 

Source
pub unsafe extern "C-unwind" fn IODataQueueSetNotificationPort(
    data_queue: *mut IODataQueueMemory,
    notify_port: mach_port_t,
) -> IOReturn
Available on crate feature libc only.
Expand description

Creates a simple mach message targeting the mach port specified in port.

This message is sent when data is added to an empty queue. It is to notify another user process that new data has become available. Please note that using this method without mapped memory create from an IOSharedDataQueue will result in undefined behavior.

Parameter dataQueue: The IODataQueueMemory region mapped from the kernel created from an IOSharedDataQueue.

Parameter notifyPort: The mach port to target with the notification message.

Returns: Returns kIOReturnSuccess on success. Returns kIOReturnBadArgument if either dataQueue is 0 (NULL).

ยงSafety

data_queue must be a valid pointer.