Bagikan melalui


NetTimerCallback (Compact 2013)

3/26/2014

This function is called by NDIS after a driver sets a one-shot or periodic timer when a timer occurs.

Syntax

VOID
  NetTimerCallback(
    IN PVOID  SystemSpecific1,
    IN PVOID  FunctionContext,
    IN PVOID  SystemSpecific2,
    IN PVOID  SystemSpecific3
    );

Parameters

  • SystemSpecific1
    A pointer to a system-specific value that is reserved for system use.
  • FunctionContext
    A pointer to a driver-supplied context area that the driver passed to the NdisSetTimerObject function. If the FunctionContext parameter of NdisSetTimerObject was NULL, NDIS uses the default value that the driver specified in the NDIS_TIMER_CHARACTERISTICS structure. The driver passed the structure to the NdisAllocateTimerObject function to initialize the associated timer object.
  • SystemSpecific2
    A pointer to a system-specific value that is reserved for system use.
  • SystemSpecific3
    A pointer to a system-specific value that is reserved for system use.

Return Value

None

Remarks

Any NDIS driver can have one or more NetTimerCallback functions. Each such NetTimerCallback function must be associated with a different driver-allocated and initialized timer object.

The driver initializes a driver-allocated timer object by calling the NdisAllocateTimerObject function.

A subsequent call to the NdisSetTimerObject function causes the NetTimerCallback function that is associated with the timer object to be run after a specified interval or periodically.

To cancel calls to NetTimerCallback, call the NdisCancelTimerObject function. NDIS might still call NetTimerCallback if the time-out has already expired before the call to NdisCancelTimerObject.

If a NetTimerCallback function shares resources with other driver functions, the driver should synchronize access to those resources with a spin lock.

Requirements

Header

ndis.h

See Also

Reference

NDIS Timer Functions
NDIS_TIMER_CHARACTERISTICS
NdisCancelTimerObject
NdisAllocateTimerObject
NdisSetTimerObject