Share via


NdisInitializeSListHead (NDIS 5.1) function

Note   NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.

NdisInitializeSListHead initializes the head of a sequenced, interlocked, singly linked list.

Syntax

VOID NdisInitializeSListHead(
  _In_ PSLIST_HEADER SListHead
);

Parameters

  • SListHead [in]
    Pointer to the caller-supplied list head to be initialized, which must be in resident memory.

Return value

None

Remarks

NdisInitializeSListHead zero-initializes the opaque list head at SListHead and sets the first-entry pointer to NULL.

The sequence number in an S-List is incremented each time an entry is inserted to, or removed from, the list.

All entries in an S-List must be nonpaged.

Any driver that uses an S-List must provide a spin lock to NdisInterlockedPushEntrySList and NdisInterlockedPopEntrySList. Before its initial call to either of these functions, the driver must initialize the spin lock with NdisAllocateSpinLock. To prevent deadlocks, the driver must not be holding this spin lock when it makes subsequent calls to NdisInterlockedPushEntrySList and NdisInterlockedPopEntrySList.

To manage a pool of fixed-size entries from nonpaged memory, consider using a lookaside list instead of an S-List.

Drivers that retry I/O operations should use a doubly linked interlocked queue and the NdisInterlockedInsert/Remove..List functions, rather than an S-List.

Requirements

Target platform

Desktop

Version

See NdisInitializeSListHead.

Header

Ndis.h (include Ndis.h)

IRQL

<= DISPATCH_LEVEL

See also

NdisInitializeNPagedLookasideList

NdisInterlockedPopEntrySList

NdisInterlockedPushEntrySList

NdisQueryDepthSList

NdisScheduleWorkItem

 

 

Send comments about this topic to Microsoft