StorPortInterlockedPopEntrySList routine

Removes an item from the front of a Storport managed singly linked list. Access to the list is synchronized on a multiprocessor system. Syntax

Syntax


ULONG StorPortInterlockedPopEntrySList(
  _In_     PVOID HwDeviceExtension,
  _Inout_  PSTOR_SLIST_HEADER SListHead,
  _Out_    PSTOR_SLIST_ENTRY * Result
);

Parameters

HwDeviceExtension [in]

A pointer to the hardware device extension for the host bus adapter (HBA).

SListHead [in, out]

A pointer to an STOR_SLIST_HEADER structure that represents the head of a singly linked list. This structure is considered opaque and is for use by the Storport driver only.

Result [out]

A pointer to a list entry pointer. The value returned is a pointer to the item removed from the front of the list. If the list is empty, then NULL is returned in the value pointed to by Result.

Return value

StorPortInterlockedPopEntrySList returns one of the following status codes:

Return codeDescription
STOR_STATUS_NOT_IMPLEMENTED

This function is not implemented on the active operating system.

STOR_STATUS_SUCCESS

The list item was successfully removed from the list or is already empty.

STOR_STATUS_INVALID_PARAMETER

A pointer in SListHead or Result is NULL.

 

Remarks

The StorPortInterlockedPopEntrySList will also return STATUS_SUCCESS when no entries are in the list. The pointer value referenced by Result must be evaluated for NULL to verify that no entry was returned.

StorPortInterlockedPopEntrySList does not free the list entry it returns. Any deallocation code for the list must take care to free memory allocated for a list entry at the location obtained prior to any adjustment for boundary alignment. The value pointed to by Result may not be the original buffer location allocated due to an adjustment for MEMORY_ALLOCATION_ALIGNMENT. See remarks for StorPortInterlockedPushEntrySList.

Requirements

Version

Available in starting with Windows 8.

Header

Storport.h (include Storport.h)

IRQL

<= DISPATCH_LEVEL

See also

StorPortInitializeSListHead
StorPortInterlockedFlushSList
StorPortInterlockedPushEntrySList
StorPortQueryDepthSList

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft