StorPortInterlockedRemoveHeadList function (storport.h)

The StorPortInterlockedRemoveHeadList routine removes an entry from the beginning of a doubly linked list of STOR_LIST_ENTRY structures.

Syntax

ULONG StorPortInterlockedRemoveHeadList(
  [in]      PVOID            HwDeviceExtension,
  [in, out] PSTOR_LIST_ENTRY ListHead,
  [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] Result

Pointer to a STOR_LIST_ENTRY structure that represents the entry removed from the list. If the list was empty, the routine returns NULL.

[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

StorPortInterlockedRemoveHeadList 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

StorPortInterlockedInsertTailList