The PoSetDeviceBusy macro notifies the Power Manager that the device associated with IdlePointer is busy.
VOID
PoSetDeviceBusy(
PULONG IdlePointer
);
None
Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.
A driver uses PoSetDeviceBusy along with PoRegisterDeviceForIdleDetection to enable system idle detection for its device. If a device that is registered for idle detection becomes idle, the Power Manager sends an IRP_MN_SET_POWER request to put the device in a requested sleep state.
PoSetDeviceBusy reports that the device is busy, so that the Power Manager can restart its idle countdown. If the device is not powered up, PoSetDeviceBusy does not change its state. That is, it does not cause the system to send a power-on request.
A driver should call PoSetDeviceBusy on every I/O request.
PoSetDeviceBusy can be called from any IRQL.