pub extern "C-unwind" fn IOAllowPowerChange(
kernel_port: io_connect_t,
notification_id: isize,
) -> IOReturnAvailable on crate features
libc and pwr_mgt only.Expand description
The caller acknowledges notification of a power state change on a device it has registered for notifications for via IORegisterForSystemPower or IORegisterApp.
Must be used when handling kIOMessageCanSystemSleep and kIOMessageSystemWillSleep messages from IOPMrootDomain system power. The caller should not call IOAllowPowerChange in response to any messages except for these two.
Parameter kernelPort: Port used to communicate to the kernel, from IORegisterApp or IORegisterForSystemPower.
Parameter notificationID: A copy of the notification ID which came as part of the power state change notification being acknowledged.
Returns: Returns kIOReturnSuccess or an error condition if request failed.