Skip to content

Latest commit

 

History

History
76 lines (58 loc) · 3.44 KB

nf-ntifs-posetdevicebusyex.md

File metadata and controls

76 lines (58 loc) · 3.44 KB
UID title description tech.root ms.date keywords ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames f1_keywords topic_type api_type api_location api_name
NF:ntifs.PoSetDeviceBusyEx
PoSetDeviceBusyEx function (ntifs.h)
Learn more about the PoSetDeviceBusyEx routine.
kernel
07/06/2023
PoSetDeviceBusyEx function
PoSetDeviceBusyEx, PoSetDeviceBusyEx routine [Kernel-Mode Driver Architecture], kernel.posetdevicebusyex, portn_62143669-4381-4b4b-8d23-8b315d882c65.xml, wdm/PoSetDeviceBusyEx
ntifs.h
Wdm.h, Ntddk.h, Ntifs.h
Universal
Windows Vista with SP1
NtosKrnl.lib
NtosKrnl.exe
Any level
Windows
PoSetDeviceBusyEx
ntifs/PoSetDeviceBusyEx
APIRef
kbSyntax
DllExport
NtosKrnl.exe
PoSetDeviceBusyEx

PoSetDeviceBusyEx function (ntifs.h)

-description

The PoSetDeviceBusyEx routine notifies the power manager that the device associated with the specified idle counter is busy.

-parameters

-param IdlePointer [in, out]

A pointer to an idle counter. This is a pointer value that was previously returned by the PoRegisterDeviceForIdleDetection routine. Because PoRegisterDeviceForIdleDetection might return a NULL pointer, the caller must verify that the pointer is non-NULL before it calls PoSetDeviceBusyEx.

-remarks

This routine is a direct replacement for the PoSetDeviceBusy macro. If you are writing new driver code for Windows Vista with Service Pack 1 (SP1) and later versions of Windows, call PoSetDeviceBusyEx instead of PoSetDeviceBusy.

A driver calls the PoSetDeviceBusyEx and PoRegisterDeviceForIdleDetection routines to enable system idle detection for its device. If a device that is registered for idle detection stays idle for the driver-specified time-out period, the power manager sends an IRP_MN_SET_POWER request to put the device in a requested sleep state.

PoSetDeviceBusyEx reports that the device is busy, so that the power manager can restart its idle countdown. If the device is in a sleep state, PoSetDeviceBusyEx does not change the state of the device. That is, it does not cause the system to send an IRP_MN_SET_POWER request to awaken the device.

PoSetDeviceBusyEx is designed for use with I/O operations that are relatively brief compared to the time-out period of the idle counter. For longer operations that might exceed this period, use the PoStartDeviceBusy and PoEndDeviceBusy routines instead.

A driver that makes multiple requests for brief I/O operations should call PoSetDeviceBusyEx for every I/O request that it makes.

-see-also

IRP_MN_SET_POWER

PoEndDeviceBusy

PoRegisterDeviceForIdleDetection

PoSetDeviceBusy

PoStartDeviceBusy