Skip to content

Latest commit

 

History

History
115 lines (85 loc) · 3.87 KB

nf-ndis-ndismsleep.md

File metadata and controls

115 lines (85 loc) · 3.87 KB
UID title description old-location 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:ndis.NdisMSleep
NdisMSleep function (ndis.h)
The NdisMSleep function delays execution of the caller for a given interval in microseconds.
netvista\ndismsleep.htm
netvista
05/02/2018
NdisMSleep function
NdisMSleep, NdisMSleep function [Network Drivers Starting with Windows Vista], ndis/NdisMSleep, ndis_delay_ref_81af917a-626a-493f-97ed-c4ce48999b12.xml, netvista.ndismsleep
ndis.h
Ndis.h
Universal
Supported for NDIS 6.0 and NDIS 5.1 drivers (see NdisMSleep (NDIS 5.1)) in Windows Vista. Supported for NDIS 5.1 drivers (see NdisMSleep (NDIS 5.1)).
Irql_Miniport_Driver_Function
Ndis.lib
< DISPATCH_LEVEL
Windows
NdisMSleep
ndis/NdisMSleep
APIRef
kbSyntax
LibDef
ndis.lib
ndis.dll
NdisMSleep

NdisMSleep function

-description

The NdisMSleep function delays execution of the caller for a given interval in microseconds.

-parameters

-param MicrosecondsToSleep [in]

The number of microseconds to delay.

-remarks

For the given time in the MicrosecondsToSleep parameter, the caller's thread of execution is put into a wait state, thereby allowing other threads to get work done on the current processor. When the given interval expires, the caller of NdisMSleep resumes execution.

An NDIS driver should always call NdisMSleep in preference to the NdisStallExecution function unless the driver is running at IRQL >= DISPATCH_LEVEL. NdisMSleep can accept a larger delay interval than NdisStallExecution, which should never be called with an interval greater than 50 microseconds. Do not call NdisMSleep with a timeout of more than 30,000,000 microseconds (that is, 30 seconds or half a minute).

Miniport drivers can call NdisMSleep from their MiniportInitializeEx and, possibly, MiniportHaltEx functions when either function must wait for state changes to occur in the NIC before that function continues its operations.

Both NdisMSleep and NdisStallExecution allow a miniport driver to specify a delay consistently and independently of the clock speed of the host CPU. Neither function involves a timer object such as those that are used by the NdisSetTimerObject function. The resolution of the host system clock varies, so very short delays can take slightly longer than the delay time that the caller of NdisMSleep or NdisStallExecution specified.

-see-also

MiniportHaltEx

MiniportInitializeEx

NdisSetTimerObject

NdisStallExecution

NdisWaitEvent

NetTimerCallback