Previous Next

PoSetDeviceBusy

The PoSetDeviceBusy macro notifies the Power Manager that the device associated with IdlePointer is busy.

VOID
  PoSetDeviceBusy(
    PULONG  IdlePointer
    ); 

Parameters

IdlePointer
Specifies a non-NULL idle pointer that was previously returned by PoRegisterDeviceForIdleDetection. Note that PoRegisterDeviceForIdleDetection might return a NULL pointer. A caller of PoSetDeviceBusy must verify that the pointer is non-NULL before passing it to PoSetDeviceBusy.

Return Value

None

Headers

Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.

Comments

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.

See Also

IRP_MN_SET_POWER, PoRegisterDeviceForIdleDetection