StorPortInterlockedInsertTailList function (storport.h)

The StorPortInterlockedInsertTailList routine atomically inserts an entry at the end of a doubly linked list of STOR_LIST_ENTRY structures.

Syntax

ULONG StorPortInterlockedInsertTailList(
  [in]      PVOID            HwDeviceExtension,
  [in, out] PSTOR_LIST_ENTRY ListHead,
  [in, out] PSTOR_LIST_ENTRY ListEntry,
  [in, out] PSTOR_LIST_ENTRY *Result,
  [in, out] PSTOR_KSPIN_LOCK Lock
);

Parameters

[in] HwDeviceExtension

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

[in, out] ListHead

Pointer to the STOR_LIST_ENTRY structure that represents the head of the list.

[in, out] ListEntry

Pointer to a STOR_LIST_ENTRY structure that represents the entry to be inserted into the list.

[in, out] Result

Pointer to a STOR_LIST_ENTRY structure that represents the first entry of the list before the new entry was inserted.

[in, out] Lock

A pointer to a STOR_KSPIN_LOCK structure that serves as the spin lock used to synchronize access to the list. The storage for the spin lock must be resident and must have been initialized by calling StorPortInitializeSpinLock.

You must use this spin lock only with the StorPortInterlockedXxxList routines.

Return value

StorPortInterlockedInsertHeadList returns one of the following status codes:

Return code Description
STOR_STATUS_NOT_IMPLEMENTED This function is not implemented on the active operating system.
STOR_STATUS_SUCCESS The list items were removed successfully or the list is already empty.
STOR_STATUS_INVALID_PARAMETER A pointer in ListHead or Result is NULL.

Requirements

Requirement Value
Target Platform Universal
Header storport.h (include Storport.h)

See also

InitializeListHead

InsertHeadList

StorPortInitializeSpinLock

StorPortInterlockedInsertHeadList

StorPortInterlockedRemoveHeadList